vi banner

vi

8 devlogs
16h 13m 57s

Vietnamese programming language interpreter

Nguyen Tuong Phat

Added support for a basic class statement. Personally this commit is painful because it challenges the infallibility of the current Acceptor trait design. I have to change the keyword handling to as attached, and will be working on it (plus an interpreter too) to make this patch more elegant.

Attachment
0
Nguyen Tuong Phat

I worked on path structures. See attached for what it means.
Next up I think I’m gonna redo the entire control flow of the project. It is just not elegant and idiomatic enough. Particularly, I think introducing a visitee trait would be nice, and I’d post it to the separate dev branch.

Attachment
0
Nguyen Tuong Phat

Added simple invocation support. Midway of trying to parse tuple expressions I realised the current juggling logic of the parser is seriously screwed. The problem was, long story short, there was no distinction between refusing to parse something AND failing to parse something.
Btw, behold the syntax tree generated as attached. I can’t make sense of it but it seems good enough.

Attachment
Attachment
0
Nguyen Tuong Phat

Just added some expression parsing. Very volatile state right now this project, but at least it can tolerate this bloody diabolical sample of code.
2 devlogs today, so productive…

Attachment
0
Nguyen Tuong Phat

After hours of trying out fonts and stuff, I’ve finally decided to lock in and solve once and for all the problem of whitespaces and advancing lexemes. 3 days of working have somewhat stabilised the parser front, but for now, it should stop throwing errors when the input file is empty. The parser design is still highly volatile, though.

Attached: the two functions that have troubled me a great deal lately.

Attachment
0
Nguyen Tuong Phat

After days of procrastination (I just moved after all), I have finally started working on the parser. So far, it is quite humble: can only parse a simple let statement with a left-hand side identifier. More to come though.

Attached: Most of the time was spent catching and solving bugs. Actually designing it takes a lot less.

Attachment
1

Comments

sam.vandenabeele.09

wow, I have found a light theme in the wild! They are very rare, try not to scare it!

Nguyen Tuong Phat

Completed unit tests for the lexer.

Attached: I learnt quite a bit about macros. More comfortable with ’em now.

Attachment
0
Nguyen Tuong Phat

Added basic lexer (check the crate “lexer”).
Will add unit tests for it and add a tokeniser too.

(Attached is the state of the code right now. Tedious)

Attachment
0