Commit graph

9 commits

Author SHA1 Message Date
dbcdbc216f added If, And, Or 2024-08-26 17:26:59 +02:00
77e57cd8c2 global and local variables with scope
also reworked arg parsing, now has --debug flag
2024-08-26 01:58:03 +02:00
b4e25ee561 fixed parser bug by filtering out all comments 2024-08-25 03:07:18 +02:00
ea0d7acbee started implementing expressions
Parser.parse now return list of statements or list of errors.
parsing continues until EOF, even when errors are found; but after the
first error the result can only be Error.
Also implemented Print and Expr statements.
2024-08-25 02:12:51 +02:00
a8290a4104 moved exprs into nodes with code position 2024-08-17 13:32:59 +02:00
485ecebdf3 reworked parser error handling
now based around result; since each parsing step can emit at most one
error until synchronisation is triggered we can store the errors in the
result.

also state is now stored in a ref variable. the copy-and-update is more
pure, but really messes up the let* expression for the expr/error
results.
2024-08-14 14:15:01 +02:00
f14677b6f5 fnished first draft of expression parser 2024-08-14 12:36:36 +02:00
3bd18634d5 implemented parsing up to neg/not 2024-08-12 18:28:21 +02:00
3590a78154 more work on the parser 2024-08-12 16:31:28 +02:00