Commit Graph

16 Commits

Author SHA1 Message Date
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 bfe9f4fe0d s/testfile/output.ll 2019-09-24 18:59:00 -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 c1d6939c43 add the rest of (currently nonfunctional) emitting of if stmts
- add compilation context and basics of type solver
2019-09-24 17:47:17 -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 1ac63cdbef resolve llvm types for function parameters 2019-09-24 13:32:00 -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 013aafa8a4 add emitting of integer and float literals
- remove panics
 - add emitting for return statements
 - remove default emitting of return a+b;
2019-09-23 22:07:19 -03:00
Luna 4c1bdb5f91 codegen: add incomplete generation of expressions 2019-09-23 18:34:12 -03:00
Luna 05c480c364 initialize all llvm features befbore emitting 2019-09-22 18:40:15 -03:00
Luna 469625d32a add CompileError error type 2019-09-22 18:26:00 -03:00
Luna a1bf15fe4d add support for target machine 2019-09-21 23:56:22 -03:00
Luna 86e899e771 cgen: output .bc file 2019-09-21 12:37:41 -03:00
Luna 243e3cc694 fix llvm linking 2019-09-21 12:31:47 -03:00
Luna 6c3d20bbbb add the basics of llvm codegen 2019-09-20 23:40:21 -03:00