wash
80e001cdc1
lang: add user args to ast iterator; combine pre/post-order traversal modes
...
the caller can now provide a pointer arg to ivy_ast_node_iterate, which will
be forwarded to the specified callback function each time it is called.
the iterator now behaves similarly to fts, in that it visits each node
in both pre-order and post-order, and indicates to the callback whether
the current iteration is pre- or post-order.
2025-04-14 12:24:42 +01:00
wash
2cd78a64b0
lang: start implementing code generation (ast to ir) facility
2025-04-14 09:48:16 +01:00
wash
fd91bb71c0
ast: implement postorder ast traversal
2025-04-14 09:46:27 +01:00
wash
2235f9c0a9
lang: change symbols for properties and atoms to -> and $ respectively
2025-04-10 13:04:12 +01:00
wash
df8d9689d1
lang: add null pointer check to arith_parse_left_paren
...
this fixes a crash that occurred when the call-operator was used on a lone ident in an expression.
2025-04-03 10:48:56 +01:00
wash
78b2eb23c3
lang: ast: implement () operator parsing
...
the () operator can be used to call lambdas in a more functional way than the standard
message-send syntax
for example, with a lambda stored in variable `x`:
x(a:2 b:6).
is equivalent to
x call(a:2 b:6).
2025-03-26 21:10:12 +00:00
wash
0c500dc19b
lang: lex: add function for creating fake ident tokens
2025-03-26 21:09:50 +00:00
wash
46d244a28d
lang: ast: implement parsing of try-catch-finally statements
2025-01-16 13:17:08 +00:00
wash
143d61e329
lang: ast: add support for multiple block termination tokens
2025-01-16 13:15:18 +00:00
wash
fa33336ed7
lang: lex: add finally keyword
2025-01-16 13:13:08 +00:00
wash
f5eaac1a4c
lang: fix underscopre not being treated as an expression start token
2025-01-15 21:11:19 +00:00
wash
bc8bfcea9d
meta: add missing exe resource files
2024-12-16 20:57:30 +00:00
wash
8b8a97c9a6
lang: ast: implement parsing of subscript operator
2024-12-08 17:08:29 +00:00
wash
753afd7d87
lang: ast: implement parsing of tuples
2024-12-08 12:28:47 +00:00
wash
1c3bb98714
lang: ast: rename IVY_AST_STATIC_PKG_ITEM to IVY_AST_PKG_ITEM
2024-12-07 21:46:24 +00:00
wash
e8c30b65b5
lang: ast: implement support for multiple expression terminator tokens
2024-12-07 21:28:25 +00:00
wash
209c47da68
lang: ast: implement parsing of static and dynamic package initialisers
2024-12-07 20:56:57 +00:00
wash
b87d152f07
meta: add metadata to win32 exe/dll files
2024-12-07 19:32:35 +00:00
wash
d404e21b33
lang: ast: implement parsing of unnamed parameters
2024-12-07 10:07:20 +00:00
wash
504fea6d9e
lang: ast: fix expr type not being set when parsing a lambda
2024-12-06 22:46:24 +00:00
wash
dba4f123d6
lang: ast: implement parsing of lambdas
2024-12-06 22:26:06 +00:00
wash
68ad0655aa
lang: ast: fix selector to_string not including keyword message labels
2024-12-06 22:25:33 +00:00
wash
dc55cfa1f8
lang: ast: propagate block terminator token to child expressions
2024-12-06 22:24:48 +00:00
wash
54c6fd7040
lang: ast: adjust and clarify the precedence of token parser callbacks
2024-12-06 22:24:08 +00:00
wash
4c36615bc1
lang: ast: implement s_terminator in block parser for all symbols
2024-12-06 21:34:26 +00:00
wash
67bfdef18a
lang: ast: misc formatting and reference fixes
2024-12-06 21:33:53 +00:00
wash
bd5e524241
lang: ast: replace ast node print callback with to_string
2024-12-06 20:24:08 +00:00
wash
ae15f228d3
lang: ast: fix finalise_property not being called when parsing a right paren
2024-12-06 20:23:46 +00:00
wash
41ef94bf3d
lang: ast: fix incorrect property parser state struct name
2024-12-06 20:23:23 +00:00
wash
ec05379e33
cmake: add support for static build
2024-12-06 19:48:20 +00:00
wash
1f7319458e
lang: ast: implement parsing of properties
2024-12-06 19:47:27 +00:00
wash
94c10dfbb2
lang: ast: implement parsing of f-strings
2024-12-06 13:46:58 +00:00
wash
2bd3e96427
lang: ast: implement parsing of atoms
2024-12-06 13:46:41 +00:00
wash
7ba0a05332
lang: ast: fix error when parsing message handler keyword-message selector
2024-12-06 13:23:02 +00:00
wash
d3813dc514
lang: ast: treat bang (!) as an unconsumed expression terminator
2024-12-06 13:22:33 +00:00
wash
d88d58be70
lang: ast: implement for-loop parsing
2024-12-06 10:02:31 +00:00
wash
f3cd89c72a
lang: ast: implement caret (return) parsing
2024-12-06 10:01:56 +00:00
wash
d1855afc05
lang: add missing includes; misc formatting cleanup
2024-12-06 09:59:57 +00:00
wash
5fe3231c9e
lang: ast: fix match node type specifying wrong node size
2024-12-05 22:00:23 +00:00
wash
9a4b074381
lang: ast: suppress debug output by default
2024-12-05 19:37:58 +00:00
wash
1a4d6089a1
lang: ast: implement parsing of while-loops
2024-12-05 19:29:21 +00:00
wash
e23cd801c9
lang: ast: fix keyword arg parser not inheriting subexpr depth correctly
2024-12-05 16:55:53 +00:00
wash
fc0a943ae8
lang: ast: improve cascade operator recipient resolution
...
the cascade operator now uses the precedence of the last message parsed
to determine the recipient of the subsequent messages, reducing the need
for parentheses and making the semantics of the operator more
predictable.
all messages in a cascade now inherit the precedence of the first
message in the cascade.
2024-12-05 16:53:59 +00:00
wash
7acf80f930
lang: ast: implement parsing of match statements
2024-12-04 22:22:25 +00:00
wash
0bb4a4284c
lang: ast: re-factor condition group parser
...
this parser now only handles if-else statements, and uses the state init callback argument to receive any pre-existing inline expressions
2024-12-04 21:04:13 +00:00
wash
a34b9c3710
lang: ast: fix expr_finalise not consuming the right-paren of a parenthesised expression
2024-12-04 20:18:40 +00:00
wash
84f3704db0
lang: ast: fix expr_finalise not handling complex message terminator
2024-12-04 16:41:18 +00:00
wash
c23523ce14
lang: ast: implement parsing of inline and standalone if-else statements
2024-12-04 16:35:19 +00:00
wash
d2677e2038
lang: lex: add hen keyword
2024-12-04 16:34:40 +00:00
wash
051cb1d2c2
lang: ast: implement cascade operator parsing
2024-12-03 21:57:44 +00:00