Commit Graph

344 Commits

Author SHA1 Message Date
504fea6d9e lang: ast: fix expr type not being set when parsing a lambda 2024-12-06 22:46:24 +00:00
dba4f123d6 lang: ast: implement parsing of lambdas 2024-12-06 22:26:06 +00:00
68ad0655aa lang: ast: fix selector to_string not including keyword message labels 2024-12-06 22:25:33 +00:00
dc55cfa1f8 lang: ast: propagate block terminator token to child expressions 2024-12-06 22:24:48 +00:00
54c6fd7040 lang: ast: adjust and clarify the precedence of token parser callbacks 2024-12-06 22:24:08 +00:00
4c36615bc1 lang: ast: implement s_terminator in block parser for all symbols 2024-12-06 21:34:26 +00:00
67bfdef18a lang: ast: misc formatting and reference fixes 2024-12-06 21:33:53 +00:00
bd377b00f4 frontend: repl: add show-lex and show-ast command options 2024-12-06 20:24:50 +00:00
175e191aa6 frontend: debug: replace custom ast node printer with ast_node_to_string 2024-12-06 20:24:33 +00:00
bd5e524241 lang: ast: replace ast node print callback with to_string 2024-12-06 20:24:08 +00:00
ae15f228d3 lang: ast: fix finalise_property not being called when parsing a right paren 2024-12-06 20:23:46 +00:00
41ef94bf3d lang: ast: fix incorrect property parser state struct name 2024-12-06 20:23:23 +00:00
4e301a3e90 doc: add properties to sample file 2024-12-06 19:51:01 +00:00
6b9bd4771d doc: full properties now always have a pipe symbol after their identifier 2024-12-06 19:49:21 +00:00
ec05379e33 cmake: add support for static build 2024-12-06 19:48:20 +00:00
1f7319458e lang: ast: implement parsing of properties 2024-12-06 19:47:27 +00:00
603c6709fb frontend: add debug-print support for ATOM and STRING nodes; add colour to several node types 2024-12-06 13:48:08 +00:00
4cfb1e56ea doc: a heck-ton more expressions for the sample file :) 2024-12-06 13:47:21 +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
7ba0a05332 lang: ast: fix error when parsing message handler keyword-message selector 2024-12-06 13:23:02 +00:00
d3813dc514 lang: ast: treat bang (!) as an unconsumed expression terminator 2024-12-06 13:22:33 +00:00
363b13534d frontend: compile: replace verbose option with dedicated logging options 2024-12-06 13:21:55 +00:00
c58eed715e doc: lots more exiciting expressions for the sample file 2024-12-06 10:02:51 +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
d1855afc05 lang: add missing includes; misc formatting cleanup 2024-12-06 09:59:57 +00:00
5fe3231c9e lang: ast: fix match node type specifying wrong node size 2024-12-05 22:00:23 +00:00
8ef057360e frontend: compile: add verbose command option 2024-12-05 21:06:03 +00:00
9a4b074381 lang: ast: suppress debug output by default 2024-12-05 19:37:58 +00:00
c0a90f40b5 doc: add while loops to sample file 2024-12-05 19:29:36 +00:00
1a4d6089a1 lang: ast: implement parsing of while-loops 2024-12-05 19:29:21 +00:00
e23cd801c9 lang: ast: fix keyword arg parser not inheriting subexpr depth correctly 2024-12-05 16:55:53 +00:00
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
ad8ce82bad doc: add match statement to sample file 2024-12-04 22:23:33 +00:00
7acf80f930 lang: ast: implement parsing of match statements 2024-12-04 22:22:25 +00:00
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
a34b9c3710 lang: ast: fix expr_finalise not consuming the right-paren of a parenthesised expression 2024-12-04 20:18:40 +00:00
7d2e945384 doc: add more inline conditional expressions to sample file 2024-12-04 16:41:34 +00:00
84f3704db0 lang: ast: fix expr_finalise not handling complex message terminator 2024-12-04 16:41:18 +00:00
04ee7d77c0 doc: add more complex expressions to sample file 2024-12-04 16:35:54 +00:00
5af47ce443 frontend: add colours to conditional AST tree debug output 2024-12-04 16:35:41 +00:00
c23523ce14 lang: ast: implement parsing of inline and standalone if-else statements 2024-12-04 16:35:19 +00:00
d2677e2038 lang: lex: add hen keyword 2024-12-04 16:34:40 +00:00
0836a1d827 doc: add sample cascade operations 2024-12-03 21:58:02 +00:00
051cb1d2c2 lang: ast: implement cascade operator parsing 2024-12-03 21:57:44 +00:00
16ab13d738 lang: ast: re-factor expression parser into multiple files 2024-12-03 13:26:55 +00:00
1204bffb4d lang: ast: fix parsing of parenthesised sub-expressions in keyword arguments 2024-12-02 11:37:01 +00:00
45e2d5919a doc: add even more complex expressions to sample file 2024-12-02 11:00:00 +00:00
6d6adf5955 lang: ast: fix parsing of consecutive unary messages 2024-12-02 10:59:49 +00:00