Luna
fc9f5d9ce0
add get expr analysis
...
- rename GetExpr.struc to GetExpr.target
2019-09-26 18:03:39 -03:00
Luna
45275d73db
change variable declarations to statements
...
doing them as expressions was a hack since no 'var' keyword,
also, yeet the := operator from the parser.
2019-09-25 22:22:13 -03:00
Luna
cb8908dc80
add type analysis for consts
...
- add the basics of recursive type resolving for expressions
- set err context for enum
2019-09-25 14:34:32 -03:00
Luna
9e80ad4c23
fix if statement emitting
...
- don't emit br instructions (or any other) if branch emits ret
- remove phi node (ifs are statements, not exprs)
- emit to testfile (even if ir is broken)
2019-09-24 18:49:35 -03:00
Luna
1bb1fb813d
add basics of if statement emitting
...
- add util mkLLVMBool
- add left/right paren to if statements
- lowkey fix for statements' semicolon
2019-09-24 14:12:37 -03:00
Luna
e25621350a
fix boolean operators
...
- remove Logical expressions
- add basic token return type to LLVMTypeRef converter
- add codegen for Bool literals
- fix "and" and "or" being identified as identifiers
2019-09-24 13:23:23 -03:00
Luna
f08d613198
switch BinaryExpr.op to BinaryOperator instead of token
...
less strings, more fun!
2019-09-23 23:18:31 -03:00
Luna
250631ff41
move Parser.mkFnDecl => ast.Node.mkFnDecl
2019-09-20 13:54:52 -03:00
Luna
79107f876b
add semicolons after statements
2019-09-20 13:34:13 -03:00
Luna
126bd476d6
fix function parameter parsing
...
- fix struct's err ctx
- rm err when parsing get exprs and others
2019-09-20 13:32:35 -03:00
Luna
075d2f22a5
add error contexts to other top levels
2019-09-20 13:24:52 -03:00
Luna
3ad0859bc9
add 'error contexts' to parser error reports
2019-09-20 13:16:55 -03:00
Luna
7ddd37b725
add synchronization to the parser
2019-09-20 12:22:46 -03:00
Luna
180444a5d6
fix for latest zig
2019-09-18 16:53:44 -03:00
Luna
927c0f6a1c
add vig's parser
2019-09-18 15:59:11 -03:00