Commit Graph

  • 4f876a36a4 Switched to bigint in lexer Krzosa Karol 2022-06-06 10:00:53 +02:00
  • 960523b443 Remove int uint, all programs compiling Krzosa Karol 2022-06-06 09:36:37 +02:00
  • 325050300a Cleanup Krzosa Karol 2022-06-06 09:17:34 +02:00
  • 6157325d8f Compiling with new untyped system Krzosa Karol 2022-06-06 08:56:03 +02:00
  • e12e0ee561 Checking if in range Krzosa Karol 2022-06-05 15:09:40 +02:00
  • 867297c41e More work on 128bit arithmetic Krzosa Karol 2022-06-05 13:58:02 +02:00
  • 73ca0c5405 Division? Krzosa Karol 2022-06-05 13:08:41 +02:00
  • 968a6ac708 Researching 128bit integers Krzosa Karol 2022-06-05 12:12:54 +02:00
  • a73b12d54d Add big int file Krzosa Karol 2022-06-04 09:34:43 +02:00
  • f3527be36a Add unicode literal Krzosa Karol 2022-06-04 09:27:59 +02:00
  • c3f235bd44 Cleanup Krzosa Karol 2022-06-04 09:12:27 +02:00
  • 4910671ab9 Delete lex.c Krzosa Karol 2022-06-03 23:16:15 +02:00
  • a324a5abf0 Compiling and running first program! Krzosa Karol 2022-06-03 23:15:16 +02:00
  • 5e798bd179 Add string accessors, working towards first program Krzosa Karol 2022-06-03 21:59:51 +02:00
  • 827cad0127 Negations and Nots working, more bugs introduced, it's getting quite complex :( Krzosa Karol 2022-06-03 18:21:47 +02:00
  • 42699034ae Got all programs working, now adding unary not and neg Krzosa Karol 2022-06-03 17:58:20 +02:00
  • 25820a0c5b More work on types Krzosa Karol 2022-06-03 16:06:33 +02:00
  • 14af46125d Fix if parsing bug Krzosa Karol 2022-06-03 15:38:29 +02:00
  • dd8fbc20ed Boolean operators Krzosa Karol 2022-06-03 15:35:27 +02:00
  • cc387af8ed Add bit ops to binary Krzosa Karol 2022-06-03 14:57:10 +02:00
  • 84b393ce2f Guarding agains big ints which are not implemented yet Krzosa Karol 2022-06-03 14:16:51 +02:00
  • c2f501bf36 More work on conversions and constant evaluation Krzosa Karol 2022-06-03 14:13:45 +02:00
  • e200a006a2 More work on typechecking and type conversions Krzosa Karol 2022-06-03 14:03:01 +02:00
  • 7e4b9777e6 Cleanup Krzosa Karol 2022-06-03 12:07:17 +02:00
  • 71d0abf122 Adding Unary [-] [+] to new type system Krzosa Karol 2022-06-03 11:17:46 +02:00
  • 081e559520 Basic type conversion when assigning, added + - unary Krzosa Karol 2022-06-03 10:48:07 +02:00
  • e2e684294e Add bool values to parser, and bool nodes to ast Krzosa Karol 2022-06-02 23:48:03 +02:00
  • 2909214ee0 Add floats Krzosa Karol 2022-06-02 22:52:16 +02:00
  • a416007bba AST_INT, AST_STR to AST_VALUE Krzosa Karol 2022-06-02 22:37:42 +02:00
  • 173ef843df New types, Value rework, Sym cleanup Krzosa Karol 2022-06-02 22:17:28 +02:00
  • 9a58e407a4 Remove null Krzosa Karol 2022-06-02 09:59:12 +02:00
  • ebb21df015 Before adding untyped types Krzosa Karol 2022-06-01 21:38:39 +02:00
  • 75985de125 Add more operators to lexer Krzosa Karol 2022-06-01 19:12:56 +02:00
  • 494a937d1f Rewritten the expression parser, tldr that '.' is actually right associative binary operator, I brain farted really hard this time Krzosa Karol 2022-06-01 18:59:38 +02:00
  • 364daed1c7 Fix field parsing Krzosa Karol 2022-06-01 15:00:27 +02:00
  • 82bb3ae493 Fix lexer end of file not unwinding scopes, Trying to run a program Krzosa Karol 2022-06-01 14:00:42 +02:00
  • 02b6a1c85b RValue, LValue concept working, Assigning to numbers is now illegal! Krzosa Karol 2022-06-01 13:28:38 +02:00
  • a5267bb8ae Adding lvalue rvalue concept, Cleanup Krzosa Karol 2022-06-01 13:23:21 +02:00
  • 94704a5340 Cleanup, adding rvalues, lvalues Krzosa Karol 2022-06-01 12:57:12 +02:00
  • 631cfce534 Cleanup Krzosa Karol 2022-06-01 12:28:58 +02:00
  • 9b18c106b6 Basic variable reassignments Krzosa Karol 2022-06-01 12:13:02 +02:00
  • 86aec0b1eb More cleanup Krzosa Karol 2022-05-31 23:01:55 +02:00
  • 98d2389c9f Cleanup Krzosa Karol 2022-05-31 22:52:56 +02:00
  • 7ea0dfc7a6 Generating for stmt Krzosa Karol 2022-05-31 18:50:41 +02:00
  • 0360086bab Restructure Krzosa Karol 2022-05-31 18:29:35 +02:00
  • 20accf8293 Parsing for stmt Krzosa Karol 2022-05-31 16:45:20 +02:00
  • 41697dec80 Ast_Init is not Ast_Binary with TK_Comma Krzosa Karol 2022-05-31 16:24:04 +02:00
  • 7dfc4c7b36 Generating nested structs Krzosa Karol 2022-05-31 16:12:18 +02:00
  • ef9c2f4ee5 Cleanup Krzosa Karol 2022-05-31 15:53:49 +02:00
  • 04d38511a9 Fix regression, constant variables now get properly rewritten Krzosa Karol 2022-05-31 14:01:18 +02:00
  • 369418b042 Rewriting field.accesses that evaluate to constants Krzosa Karol 2022-05-31 13:39:34 +02:00
  • 1168965ba4 Accessing constant values in structs Krzosa Karol 2022-05-31 13:27:21 +02:00
  • 437a776d78 Folding constant enum access into constant int value Krzosa Karol 2022-05-31 13:10:56 +02:00
  • 627e2bad88 Initial enums working Krzosa Karol 2022-05-31 11:50:36 +02:00
  • 5e0aabb1cb Update todo Krzosa Karol 2022-05-30 18:55:15 +02:00
  • a9b0318720 Wanky constant in structs sort of working but long way to go Krzosa Karol 2022-05-30 18:46:01 +02:00
  • 980a3b68b9 Struct field access. Damn, I coded for like 30 minutes and then it just worked on the first try Krzosa Karol 2022-05-30 18:27:06 +02:00
  • 0e0b95ab52 Constants in structs Krzosa Karol 2022-05-30 13:44:10 +02:00
  • 55fd4ca40c For from pointer to reference Krzosa Karol 2022-05-30 13:34:04 +02:00
  • 3a97e739a8 More work on calls and compound statements Krzosa Karol 2022-05-30 13:22:57 +02:00
  • b2d3e9d8e1 Fix invalid pointer in struct type, more work on calls Krzosa Karol 2022-05-30 11:20:00 +02:00
  • 671853287a Fix bug with indexing function call Krzosa Karol 2022-05-30 11:10:27 +02:00
  • 9e24a608cb Rewriting function calls to have named parameters, default values Krzosa Karol 2022-05-30 11:00:30 +02:00
  • 54e3cb5261 On constructors Krzosa Karol 2022-05-30 09:10:15 +02:00
  • c305d4da44 Calling functions is working, same syntax as compound stmts Krzosa Karol 2022-05-30 09:04:34 +02:00
  • 802dce749e Change syntax of compound exprs Krzosa Karol 2022-05-29 23:42:53 +02:00
  • 3f44a533be Holy, Is this the based department? Is it actually working??? Krzosa Karol 2022-05-29 22:19:37 +02:00
  • 4434ad1fb5 More order independent globals Krzosa Karol 2022-05-29 22:07:08 +02:00
  • 2ad3131dba More work on order independent bindings, A bit more cleanup, Delete some of the null code, no longer valid c code Krzosa Karol 2022-05-29 21:38:29 +02:00
  • b6ea62fd67 Work on order independent structs + cleanup Krzosa Karol 2022-05-29 20:32:04 +02:00
  • ea1b74cda0 Adding struts Krzosa Karol 2022-05-29 12:30:02 +02:00
  • 07b793aacc Begin structs, add comment on multiline lambdas, add Ast flags Krzosa Karol 2022-05-29 11:29:26 +02:00
  • 7de941899f Fix crashes Krzosa Karol 2022-05-28 17:48:52 +02:00
  • 798453c7db Adding parent nodes to asts Krzosa Karol 2022-05-27 16:19:18 +02:00
  • 8fb29e21d1 Remove old token_array.c Krzosa Karol 2022-05-27 15:35:47 +02:00
  • d6401ff05d Recursive lambdas with new system Krzosa Karol 2022-05-27 15:35:15 +02:00
  • 79aa52e726 Typedef works for simple case Krzosa Karol 2022-05-27 15:18:07 +02:00
  • 8875b61970 Add typedefs in codegen, globals is working Krzosa Karol 2022-05-27 15:00:45 +02:00
  • 46abf8c1a6 Initial working version of types as expressions Krzosa Karol 2022-05-27 13:46:27 +02:00
  • d8a9b318b7 Changing typespecs to be normal expressions Krzosa Karol 2022-05-27 12:29:51 +02:00
  • f66fd447e5 Removed resolved pointer from Ast_Typespec, it's accessed using a map now Krzosa Karol 2022-05-27 12:05:23 +02:00
  • 01acad47ec Map redesign, removing just flags as unoccupied, when getting value we dont check occupancy but key, avoids hanging values due to the nature of linear probing Krzosa Karol 2022-05-26 23:46:26 +02:00
  • 7c4b01cd92 Local symbols use linear array searches now, there was a bug, when removing from map we are leaving holes it makes some entries unreachable Krzosa Karol 2022-05-26 23:40:23 +02:00
  • 3c6d02877b Recursive functions working Krzosa Karol 2022-05-26 22:40:30 +02:00
  • 18a895153e Basic order independent decls working Krzosa Karol 2022-05-26 21:30:50 +02:00
  • b773ad1c17 Trying to add order indendent decls Krzosa Karol 2022-05-26 21:09:07 +02:00
  • 0e398c84b6 Cleanup, There is no decl anymore, Ast_Named Krzosa Karol 2022-05-26 20:21:24 +02:00
  • ec773c08be Add init statement to if Krzosa Karol 2022-05-26 18:57:15 +02:00
  • 8e4942f5ae Delete old version files Krzosa Karol 2022-05-26 18:15:27 +02:00
  • 3d9a38494c Add if statements Krzosa Karol 2022-05-26 18:13:37 +02:00
  • 3cd79040bc Fix compile errors when compiling for msvc Krzosa Karol 2022-05-26 16:55:07 +02:00
  • c88b38cc44 Successful compile with new parser! Krzosa Karol 2022-05-26 14:49:50 +02:00
  • d9a80afa9e Working on the lexer, handling indentation and scopes Krzosa Karol 2022-05-26 14:24:11 +02:00
  • f4c05923c9 Compile string, working on scopes Krzosa Karol 2022-05-25 15:17:08 +02:00
  • b945f3affd Lambdas, statements, typechecking lambdas Krzosa Karol 2022-05-25 14:44:30 +02:00
  • 9dc2e1588d Work on lambda body Krzosa Karol 2022-05-24 23:35:49 +02:00
  • 52910d5606 Lexer is not collecting hanging new lines Krzosa Karol 2022-05-24 22:13:53 +02:00
  • e032fefd07 Ast modified, Ast_Expr is not a union instead it uses inheritence Krzosa Karol 2022-05-24 21:01:27 +02:00
  • 5176b40204 Generating valid c code, more work on null values Krzosa Karol 2022-05-24 20:33:11 +02:00
  • 236ff0cd64 Added lambda expressions, lambda types, no body yet Krzosa Karol 2022-05-20 17:16:53 +02:00