Commit graph

11 commits

Author SHA1 Message Date
b52c1b26c9 overhaul operator precedence
arithmetic operators now have the same precedence.
if you want them to bind tighter, you remove the spaces around them:

- 2 + 2 * 2 = 8
- 2 + 2*2 = 6
2025-09-01 22:43:41 +02:00
ce9150b588 remove unused functions 2025-09-01 17:18:20 +02:00
9de4a8aecd replace def = value with def: value, and let a = b with a = b
in the name of terseness

i'm also slipping in a new brush preset that i made

closes #125
2025-07-01 00:56:27 +02:00
e19e47e6ad fix clippy lints 2024-10-23 20:45:34 +02:00
958cab5452 improve error reporting for missing else clauses 2024-09-07 14:31:48 +02:00
d309211558 allow up to 65536 parser events
parser events don't take up enough memory to warrant a stricter limit.
I do wonder if this limit is actually reachable with a 65536 character limit though.
2024-09-04 22:16:01 +02:00
f4ceb0057e add a bunch of logging to haku, including vm-trace for tracing what the VM does 2024-09-02 21:36:38 +02:00
337de0b57b return an error when the parser is at its event capacity 2024-09-02 20:41:13 +02:00
a30c36c92a fix compilation errors on release mode due to missing #[cfg(debug_assertions)] with parser event tracing 2024-09-01 19:20:24 +02:00
084012d65f parser debugging utilities + fixed paren sometimes producing unbalanced events
parser events now have a `from` field which has the source location of where the event was emitted.
this location is pretty-printed when using `Debug`
2024-09-01 10:03:21 +02:00
2595bf0d82 syntax v2
introduce a new, more ergonomic syntax for haku
not all features are implemented just yet. still missing:

- custom tags (non-True/False)
- color literals
- lists
2024-09-01 09:29:11 +02:00