7 Commits

Author SHA1 Message Date
af30410aab parser: fix newline checks after statements
since there is no EOL delimiter like ';', we have to check for newline to avoid something like `a = 4 + 4 b = a`
also added tests for expr parsing

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-08-14 00:57:17 +05:30
360687f3c0 ast: make static an entity
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-08-13 22:20:51 +05:30
ad57170010 lexer: allow underscore for identifiers
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-08-13 07:35:20 +05:30
d70b196042 parser: init
does not support many expressions

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-07-31 00:27:55 +05:30
384f382cfc ast: random changes
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-07-30 16:37:12 +05:30
bcc3b29fc5 ast: rename Type to Primitive
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-07-30 01:51:13 +05:30
32484b3d6a ast: add a naive ast for now
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-07-29 23:38:06 +05:30