Commit graph

33 commits

Author SHA1 Message Date
Janis f5fc8195f4 fix, lint 2025-03-06 01:12:25 +01:00
Janis 1be3f29e23 place-value stuff should work now 2025-03-06 01:02:35 +01:00
Janis 6d70231c91 this should be correct? 2025-03-05 22:21:36 +01:00
Janis 51aa119af2 i dont think this is the right way to do this, in hindsight 2025-03-05 15:49:19 +01:00
Janis 028c74753e place and value expression conversion in ast 2025-03-05 15:48:46 +01:00
Janis 1a20acd763 ast visiting for IR building 2025-03-04 18:58:55 +01:00
Janis 379769bc59 split ast tag arrays 2025-03-01 19:22:31 +01:00
Janis 43c828d96f irgen of ast2 2024-12-29 19:57:29 +01:00
Janis f6b956deee normalising BlockTrailingExpr where it returns into Block with a Ret expr 2024-12-27 03:49:50 +01:00
Janis e002a6ddc9 small fixes/visiter pattern/pub visibility 2024-12-27 03:49:25 +01:00
Janis 1b5cc3302b rename ast_visitor module to visitor 2024-12-26 01:03:30 +01:00
Janis f6fc83ce02 using visitor for rendering ast 2024-12-26 01:02:40 +01:00
Janis 4e59e02178 visitor pattern for ast 2024-12-26 00:40:11 +01:00
Janis 13df06421c intern struct type the first time it is defined
at that point the fields might not yet have proper types
2024-12-25 20:37:35 +01:00
Janis 7c01afbf2f TOO MUCH!!!! InternPool use everywhere in old ast 2024-12-23 02:34:02 +01:00
Janis a3bee90ac3 mir/triples use internpool now for types 2024-12-22 22:25:01 +01:00
Janis 0994f4b187 fix comptime eval 2024-12-22 19:12:15 +01:00
Janis 96863e0397 cargo fmt 2024-12-22 19:01:22 +01:00
Janis 30ce12988d insert symbol on functiondecl
return ident from parse_fn_proto
2024-12-22 19:00:29 +01:00
Janis 7cea2452d1 from none doesn't need data to be passed 2024-12-22 18:58:20 +01:00
Janis 1df5429eab extracting ast2::intern into its own file 2024-12-22 18:57:19 +01:00
Janis cbbbb7989a array types can now use an expression to define the array size
this was surprisingly non-trivial
2024-09-16 17:18:23 +02:00
Janis 4f70fa2246 comptime folding,
- reduced scope of foldability to just simple expressions and declrefs to globaldecls
2024-09-16 16:55:04 +02:00
Janis 464baa7bd7 creating graph for comptime folding dependencies 2024-09-16 01:04:52 +02:00
Janis 5ad0e9e8e7 calculate which nodes are comptime evaluable 2024-09-16 00:15:39 +02:00
Janis 888517f2ea soooo many thigns in need to commit more often
also, types exist in the ast, but are interned after parsing
refs and typerefs are resolved
true and false in the intern pool, need to add them to primaryexpr
structs in the internpool take a decl to differentiate struct types of the same
name
field access postfix expr? also nesting postfix expr (e.g. var[1][2])
arrays can only be specified with integral constants as length

fixes:
sinttype and uinttype store bits inline in item.index correctly
mut/var decl assignment? have correct doc strings
let/var symbol is inserted after the assignment expr, so that the expr can still
use
now-shadowed variables
structs can have fields of type pointer-to-self (ast)
lots of wrong-cases in node children getting
2024-09-15 00:38:50 +02:00
Janis a565c1e1e9 parsing struct definitions in ast 2024-09-14 13:09:17 +02:00
Janis de22a9e01a helper function for parsing text within () or {} 2024-09-13 22:47:04 +02:00
Janis 4432cf198e better debug impls for types, fix for simpletype key 2024-09-13 19:36:13 +02:00
Janis 5c38969ef8 cooooool stuff for the new ast generator and intern pool and symbol table
basically, btrees are awesome.
2024-09-13 19:07:42 +02:00
Janis 6f3a7dc56c helpers for reading ast Data and getting children of ast nodes 2024-09-09 15:41:56 +02:00
Janis 45653380cf new ast parser 2024-09-09 15:01:53 +02:00
Janis 44fa241a79 new ast module 2024-09-03 22:58:46 +02:00