Commit Graph

15 Commits

Author SHA1 Message Date
e37f68424b Improved math expressions (#6)
* Improved math expressions

Things are in a better state, + - / * work now for basic const var = 5 <operator> 1

Though the current method I'm using to make the ast isn't really going to work for dealing with precedence rules so some refactoring is needed going forward

* get complex math expressions working with precedence including parans

Node that identifiers are working, call expressions are not, that's a TODO
/ * % + - are working both other things like exponent and logical operators are also not working.
Recasting is the most important thing to implement next

* get recasting working for nested binary expressions

* clean up
2023-01-21 21:23:01 +11:00
a1f844b0b1 add member expression 2023-01-03 19:41:27 +11:00
d2a4bb7851 refactor makeValue and makeDeclatator to reduce code duplication 2023-01-02 12:20:32 +11:00
dbf8a993e5 add object declarations 2023-01-01 21:48:30 +11:00
3d6f5982c2 add array declarations 2022-12-30 21:53:50 +11:00
f0076309ef pipe working for everything except sketches 2022-12-03 22:50:46 +11:00
15bddcc842 add pipe operator to tokeniser and ast
Executor and recast TODO
2022-12-02 21:00:57 +11:00
48e59ac710 remove semi-colons 2022-11-26 08:38:57 +11:00
dd140d041a add ast for sketch expression 2022-11-20 17:50:17 +11:00
082730bb2e Refactor executor to make it able to call recursively
and Add variable declarator using callExpression AST test
2022-11-20 09:41:21 +11:00
c7be6e592c add function declaration with input params< 2022-11-18 08:20:18 +11:00
7ebfba46e2 start of function declaration 2022-11-17 20:17:00 +11:00
e89241de92 add find-closing-brace util function 2022-11-17 16:06:38 +11:00
aed0763770 Add callee expression parsing 2022-11-14 13:28:16 +11:00
24189282ec re-arrange folder 2022-11-13 11:15:35 +11:00