11 Commits

Author SHA1 Message Date
f591809d1f Remove read_expression and use parse_expression directly 2024-10-24 22:29:18 +01:00
acb4cd38d7 Extract line reading logic to reader and remove REPL tests
Reading a line into the buffer was the only logic complex enough to be
worth testing really, and exposing the necessary parts of it to test
it effectively was a pain.  Makes more sense to move read_line out and
throw away most of the tests.
2024-10-24 22:09:33 +01:00
e5cd69c26b Allow whitespace in expressions 2024-10-24 21:39:47 +01:00
10803109db Yield NULL from read_expression() on invalid input 2024-10-24 21:39:47 +01:00
e0070bfb1e Add paren support to reader 2024-10-24 21:39:47 +01:00
9988f6dcb8 Support * and / in reader 2024-10-24 21:39:47 +01:00
9932aa7ef1 Make + and - left-associative 2024-10-24 21:39:47 +01:00
5ea066b75e Refactor parsing routines 2024-10-24 21:39:47 +01:00
d4855813a2 Handle nesting and subtraction in reader 2024-10-24 21:39:47 +01:00
8ba4035afc Add basic sum parsing 2024-10-24 21:39:47 +01:00
f251fd04cc Implement decimal integer reading 2024-10-24 16:24:49 +01:00