76d0e6723f
Add "return" statement
...
Functions may now be exited by returning a value or no value.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com >
2020-10-07 16:34:23 -07:00
4848a342f0
Add function compilation
...
Functions are compiled in the most naiive way right now. I want to fix
up how scope lookups are done before it becomes too much to update.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com >
2020-09-26 18:31:23 -07:00
f0032afe12
Add function expr parsing
...
* Introduce new `fn` keyword
* Function example is added to examples/expr.not
Signed-off-by: Alek Ratzloff <alekratz@gmail.com >
2020-09-18 16:39:06 -07:00
1be0fb8a04
Add implementations for parsing assign statements, forgot to do this
...
Signed-off-by: Alek Ratzloff <alekratz@gmail.com >
2020-09-17 13:17:53 -07:00
e2c43dc911
Add LhsExpr parsing
...
Signed-off-by: Alek Ratzloff <alekratz@gmail.com >
2020-09-03 18:58:22 -07:00
4d8a815ffc
Remove old TODO from parser grammar
...
Signed-off-by: Alek Ratzloff <alekratz@gmail.com >
2020-09-03 18:49:53 -07:00
f8819279f8
Fix parser for index and call exprs, remove old test that didn't work, add visitor pattern
...
Signed-off-by: Alek Ratzloff <alekratz@gmail.com >
2020-09-03 18:32:22 -07:00
2fd340a688
Add lexer, parser, ast, and basic command line interaction
...
* Add lexer and parser using lrpar crate
* AST is added and constructed via lexer and parser
* Command line program `not` will read a file and parse it
Signed-off-by: Alek Ratzloff <alekratz@gmail.com >
2020-09-02 14:40:43 -07:00
178ed4a952
Initial commit
...
Includes: runtime base from a previous project, syn(tax) module with
parser and lexer
Signed-off-by: Alek Ratzloff <alekratz@gmail.com >
2020-09-01 17:32:48 -07:00