Commit Graph

41 Commits

Author SHA1 Message Date
8ab377b3ab lang: ast: implement parsing of true/false/null keyword constants 2025-09-08 15:56:03 +01:00
bf250179da lang: ast: implement parsing of break/continue loop-control statements 2025-09-08 15:55:12 +01:00
84e52b1649 lang: ast: replace var keyword with global
local variables are now created automatically when they are first assigned to.

the global keyword can be used to declare that a name refers to a global variable instead,
at which point, assigning to the name results in the assignment referencing the global variable
instead of allocating a new global variable.
2025-09-08 15:52:29 +01:00
c12371f0ec lang: ast: add diag support to parser 2025-05-08 22:30:23 +01:00
25c1fbd44b lang: fix a bunch of memory leaks 2025-04-17 23:15:48 +01:00
f0e6237473 lang: codegen: redesign again to use purely pre-order ast traversal 2025-04-16 21:58:52 +01:00
e430b7b2f1 lang: add var keyword for variable declarations
the var keyword allows greater control over what scope a
particular variable exists in. it clarifies whether a new
variable is being defined or an existing variable is being
assigned to. it will also facilitate the implementation of
global variables.
2025-04-15 11:02:47 +01:00
46d244a28d lang: ast: implement parsing of try-catch-finally statements 2025-01-16 13:17:08 +00:00
f5eaac1a4c lang: fix underscopre not being treated as an expression start token 2025-01-15 21:11:19 +00:00
753afd7d87 lang: ast: implement parsing of tuples 2024-12-08 12:28:47 +00:00
1c3bb98714 lang: ast: rename IVY_AST_STATIC_PKG_ITEM to IVY_AST_PKG_ITEM 2024-12-07 21:46:24 +00:00
209c47da68 lang: ast: implement parsing of static and dynamic package initialisers 2024-12-07 20:56:57 +00:00
dba4f123d6 lang: ast: implement parsing of lambdas 2024-12-06 22:26:06 +00:00
54c6fd7040 lang: ast: adjust and clarify the precedence of token parser callbacks 2024-12-06 22:24:08 +00:00
67bfdef18a lang: ast: misc formatting and reference fixes 2024-12-06 21:33:53 +00:00
bd5e524241 lang: ast: replace ast node print callback with to_string 2024-12-06 20:24:08 +00:00
1f7319458e lang: ast: implement parsing of properties 2024-12-06 19:47:27 +00:00
94c10dfbb2 lang: ast: implement parsing of f-strings 2024-12-06 13:46:58 +00:00
2bd3e96427 lang: ast: implement parsing of atoms 2024-12-06 13:46:41 +00:00
d88d58be70 lang: ast: implement for-loop parsing 2024-12-06 10:02:31 +00:00
f3cd89c72a lang: ast: implement caret (return) parsing 2024-12-06 10:01:56 +00:00
1a4d6089a1 lang: ast: implement parsing of while-loops 2024-12-05 19:29:21 +00:00
7acf80f930 lang: ast: implement parsing of match statements 2024-12-04 22:22:25 +00:00
c23523ce14 lang: ast: implement parsing of inline and standalone if-else statements 2024-12-04 16:35:19 +00:00
051cb1d2c2 lang: ast: implement cascade operator parsing 2024-12-03 21:57:44 +00:00
1c5b23d968 lang: ast: re-write expression parser to support keyword messages
also adjust some parser state callbackss to better support sub-parsers returning
 results to their parents.
2024-12-02 07:56:27 +00:00
b5cb87e8df lang: fix lots of compiler warnings/errors 2024-12-01 13:25:36 +00:00
ec24e2c327 lang: ast: convert RPN expression queue to ast and replace generic EXPR node with it 2024-11-28 22:06:25 +00:00
05ced5d5fc lang: ast: define ast_node_type for some fundamental expression components 2024-11-28 22:05:37 +00:00
a37e4d23bb lang: ast: get_token_expr_type now uses the operator table to discern expression symbols 2024-11-28 16:59:04 +00:00
fc76fe6ad4 lang: ast: use fancy index manipulation to reduce the size of ast_node_type 2024-11-28 10:56:43 +00:00
811d3787c4 lang: ast: add a BLOCK ast node to hold lists of expressions 2024-11-28 10:26:53 +00:00
7f9894d8f9 lang: fix a bunch of compiler warnings 2024-11-27 22:45:34 +00:00
101d87e09d lang: ast: implement simple identifier and operator expression parsing 2024-11-27 22:29:29 +00:00
ad25b89af0 lang: ast: fix incorrect return types; add function to determine expression tokens 2024-11-27 12:56:10 +00:00
cd89c20beb lang: ast: implement control flags returned by parser functions 2024-11-26 21:30:40 +00:00
f9b0096dd7 lang: ast: initial implementation of class parser 2024-11-25 16:50:42 +00:00
f603551e26 lang: ast: fix compiler warnings 2024-11-24 21:31:49 +00:00
1e7e73db21 lang: ast: implement ast iteration
iteration is implementing without recursion, instead using type-specific callbacks to construct a queue of nodes to iterate through. ast priting is implemented using this functionality.
2024-11-24 20:50:12 +00:00
fbef0b6743 lang: ast: add stub functions for retrieving, printing, interating, and destroying ast nodes 2024-11-24 16:12:31 +00:00
f1ea916155 lang: ast: re-factor parser into multiple files 2024-11-24 11:11:06 +00:00