Commit Graph

26 Commits

Author SHA1 Message Date
Luna b0ddffd5fe hashmap changes, part 2 2020-07-23 17:06:43 -03:00
Luna e0f0ae7f24 toSlice -> items 2020-07-23 16:42:59 -03:00
Luna 03561ebe6a zig fmt pass 2020-07-23 16:42:49 -03:00
Luna 74e6beda67 more fixes for latest zig 2020-04-01 21:58:30 -03:00
Luna 049a388660 more fixes for latest zig 2020-04-01 21:48:08 -03:00
Luna cf22d47e13 ast_printer: tuple-ify 2020-04-01 16:03:46 -03:00
Luna 5348e2b5c4 remove Stmt as an AST node
it was only used for printing purposes, even though we can use the
existing printStmt() function.
2019-10-05 10:37:28 -03:00
Luna f2520e7d02 change bits and pieces everywhere about var meta 2019-09-28 22:16:33 -03:00
Luna 9869cca2ae remove mutability/publicability
i may implement those in a better way, which isn't V's
2019-09-28 18:09:58 -03:00
Luna a136a377ce change symbol table to use pointers to heap allocated symbols 2019-09-28 13:17:11 -03:00
Luna 849bbc0e94 add support for resolving parameters in function body 2019-09-27 20:39:16 -03:00
Luna 3f94082477 analyze: make VarDecl statements insert symbols to current scope 2019-09-27 14:07:42 -03:00
Luna 7e41d03eb9 add proper Integer32 and Integer64 literals 2019-09-27 12:07:20 -03:00
Luna 093a8003b6 ast_printer: fix children printing
- add scope ids for debug purposes
 - add children to parent on Scope.createChild
 - types: add validation of if's condition expr type
 - types: add scopes to ifs
2019-09-26 21:36:26 -03:00
Luna fc9f5d9ce0 add get expr analysis
- rename GetExpr.struc to GetExpr.target
2019-09-26 18:03:39 -03:00
Luna 64e39a6f1e ast_printer: print scopes inside functions
- comp_ctx: add children attr for debug info
2019-09-26 16:58:57 -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 5188dac3c0 add type analysis of enums 2019-09-25 11:59:36 -03:00
Luna 6b3d54aed7 embed FnDecl inside FunctionSymbol for correct param order 2019-09-25 10:53:10 -03:00
Luna e2cca03d52 add type resolving for structs and fn params
- add a printer for the symbol table
 - add error contexts to type pass
2019-09-25 00:26:30 -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 d69365ba92 ast_printer: fix printing of func params 2019-09-20 13:36:15 -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