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
93811c986d
codegen: use Parameter.llvm_alloca
2019-09-28 12:46:23 -03:00
Luna
178acc656f
codegen: allow for mutable statements
...
- ast: add llvm_alloca llvmvalueref pointer in VarDeclStmt
2019-09-28 11:30:21 -03:00
Luna
7def9abc5a
add "variable metadata"
...
this is inserted in the analysis pass into a map from expr ptrs to
metadata in the compilation context itself, this enables codegen to
fetch that metadata with the expr pointer
the other approach was embedding it into the variable expr itself (as
seen by VariableExpr), but that causes a compiler crash
2019-09-27 17:08:01 -03:00
Luna
7e41d03eb9
add proper Integer32 and Integer64 literals
2019-09-27 12:07:20 -03:00
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
5188dac3c0
add type analysis of enums
2019-09-25 11:59:36 -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
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