Commit Graph

459 Commits

Author SHA1 Message Date
Krzosa Karol
827cad0127 Negations and Nots working, more bugs introduced, it's getting quite complex :( 2022-06-03 18:21:47 +02:00
Krzosa Karol
42699034ae Got all programs working, now adding unary not and neg 2022-06-03 17:58:20 +02:00
Krzosa Karol
25820a0c5b More work on types 2022-06-03 16:06:33 +02:00
Krzosa Karol
14af46125d Fix if parsing bug 2022-06-03 15:38:29 +02:00
Krzosa Karol
dd8fbc20ed Boolean operators 2022-06-03 15:35:27 +02:00
Krzosa Karol
cc387af8ed Add bit ops to binary 2022-06-03 14:57:10 +02:00
Krzosa Karol
84b393ce2f Guarding agains big ints which are not implemented yet 2022-06-03 14:16:51 +02:00
Krzosa Karol
c2f501bf36 More work on conversions and constant evaluation 2022-06-03 14:13:45 +02:00
Krzosa Karol
e200a006a2 More work on typechecking and type conversions 2022-06-03 14:03:01 +02:00
Krzosa Karol
7e4b9777e6 Cleanup 2022-06-03 12:07:17 +02:00
Krzosa Karol
71d0abf122 Adding Unary [-] [+] to new type system 2022-06-03 11:17:46 +02:00
Krzosa Karol
081e559520 Basic type conversion when assigning, added + - unary 2022-06-03 10:48:07 +02:00
Krzosa Karol
e2e684294e Add bool values to parser, and bool nodes to ast 2022-06-02 23:48:03 +02:00
Krzosa Karol
2909214ee0 Add floats 2022-06-02 22:52:16 +02:00
Krzosa Karol
a416007bba AST_INT, AST_STR to AST_VALUE 2022-06-02 22:37:42 +02:00
Krzosa Karol
173ef843df New types, Value rework, Sym cleanup 2022-06-02 22:17:28 +02:00
Krzosa Karol
9a58e407a4 Remove null 2022-06-02 09:59:12 +02:00
Krzosa Karol
ebb21df015 Before adding untyped types 2022-06-01 21:38:39 +02:00
Krzosa Karol
75985de125 Add more operators to lexer 2022-06-01 19:12:56 +02:00
Krzosa Karol
494a937d1f Rewritten the expression parser, tldr that '.' is actually right associative binary operator, I brain farted really hard this time 2022-06-01 18:59:38 +02:00
Krzosa Karol
364daed1c7 Fix field parsing 2022-06-01 15:00:27 +02:00
Krzosa Karol
82bb3ae493 Fix lexer end of file not unwinding scopes, Trying to run a program 2022-06-01 14:00:42 +02:00
Krzosa Karol
02b6a1c85b RValue, LValue concept working, Assigning to numbers is now illegal! 2022-06-01 13:28:38 +02:00
Krzosa Karol
a5267bb8ae Adding lvalue rvalue concept, Cleanup 2022-06-01 13:23:21 +02:00
Krzosa Karol
94704a5340 Cleanup, adding rvalues, lvalues 2022-06-01 12:57:12 +02:00
Krzosa Karol
631cfce534 Cleanup 2022-06-01 12:28:58 +02:00
Krzosa Karol
9b18c106b6 Basic variable reassignments 2022-06-01 12:13:02 +02:00
Krzosa Karol
86aec0b1eb More cleanup 2022-05-31 23:01:55 +02:00
Krzosa Karol
98d2389c9f Cleanup 2022-05-31 22:52:56 +02:00
Krzosa Karol
7ea0dfc7a6 Generating for stmt 2022-05-31 18:50:41 +02:00
Krzosa Karol
0360086bab Restructure 2022-05-31 18:29:35 +02:00
Krzosa Karol
20accf8293 Parsing for stmt 2022-05-31 16:45:20 +02:00
Krzosa Karol
41697dec80 Ast_Init is not Ast_Binary with TK_Comma 2022-05-31 16:24:04 +02:00
Krzosa Karol
7dfc4c7b36 Generating nested structs 2022-05-31 16:12:18 +02:00
Krzosa Karol
ef9c2f4ee5 Cleanup 2022-05-31 15:53:49 +02:00
Krzosa Karol
04d38511a9 Fix regression, constant variables now get properly rewritten 2022-05-31 14:01:18 +02:00
Krzosa Karol
369418b042 Rewriting field.accesses that evaluate to constants 2022-05-31 13:39:34 +02:00
Krzosa Karol
1168965ba4 Accessing constant values in structs 2022-05-31 13:27:21 +02:00
Krzosa Karol
437a776d78 Folding constant enum access into constant int value 2022-05-31 13:10:56 +02:00
Krzosa Karol
627e2bad88 Initial enums working 2022-05-31 11:50:36 +02:00
Krzosa Karol
5e0aabb1cb Update todo 2022-05-30 18:55:15 +02:00
Krzosa Karol
a9b0318720 Wanky constant in structs sort of working but long way to go 2022-05-30 18:46:01 +02:00
Krzosa Karol
980a3b68b9 Struct field access. Damn, I coded for like 30 minutes and then it just worked on the first try 2022-05-30 18:27:06 +02:00
Krzosa Karol
0e0b95ab52 Constants in structs 2022-05-30 13:44:10 +02:00
Krzosa Karol
55fd4ca40c For from pointer to reference 2022-05-30 13:34:04 +02:00
Krzosa Karol
3a97e739a8 More work on calls and compound statements 2022-05-30 13:22:57 +02:00
Krzosa Karol
b2d3e9d8e1 Fix invalid pointer in struct type, more work on calls 2022-05-30 11:20:00 +02:00
Krzosa Karol
671853287a Fix bug with indexing function call 2022-05-30 11:10:27 +02:00
Krzosa Karol
9e24a608cb Rewriting function calls to have named parameters, default values 2022-05-30 11:00:30 +02:00
Krzosa Karol
54e3cb5261 On constructors 2022-05-30 09:10:15 +02:00