Commit Graph

19 Commits

Author SHA1 Message Date
4386965cd9 lang: update bluelib api usage 2025-11-06 10:38:32 +00: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
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
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
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
624f183de8 lang: ast: fix inconsistent indentation 2024-11-29 12:06:06 +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
fc76fe6ad4 lang: ast: use fancy index manipulation to reduce the size of ast_node_type 2024-11-28 10:56:43 +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
dca0aba183 lang: ast: implement parsing 'use' statements 2024-11-25 16:49:07 +00:00
f1032f0c8e lang: ast: move unit-package parser state definition to c file 2024-11-25 16:48:03 +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
ab74c882d1 lang: ast: fill in stub functions for unit and unit-package 2024-11-24 16:11:33 +00:00
70aab9998b lang: ast: add ast node size to ast_node_type 2024-11-24 11:52:59 +00:00
d43e387158 lang: ast: add state size to ast_node_type 2024-11-24 11:42:43 +00:00
f1ea916155 lang: ast: re-factor parser into multiple files 2024-11-24 11:11:06 +00:00