Commit Graph

88 Commits

Author SHA1 Message Date
Luna 02c2055601 parser: make println consume parens 2019-08-24 16:56:58 -03:00
Luna 1651a99faf parser: don't skip tokens on groupings 2019-08-24 16:51:37 -03:00
Luna a4fa0e0cfc ast: add stmt printing 2019-08-24 16:20:32 -03:00
Luna 86d8fe1a3a add basics of statements 2019-08-24 16:00:22 -03:00
Luna 2ba0efa92c parser: use mkBinary (allocating them on heap) 2019-08-24 13:07:01 -03:00
Luna 9ad0c7df0e remove ident from printExpr 2019-08-24 11:15:41 -03:00
Luna ea5de0914a working expressions 2019-08-24 11:07:23 -03:00
Luna f9cc734965 add (untested) expression parsing 2019-08-23 22:13:26 -03:00
Luna 899c015cbe add basic const parsing (needs expr)
- parser: fix main root loop's priming
2019-08-23 16:34:41 -03:00
Luna 89e386d2d4 add basic param parsing 2019-08-23 15:52:04 -03:00
Luna 7ba140dd73 add better ast printing 2019-08-23 15:42:50 -03:00
Luna e3fdf5399b redo parser for the 300th time 2019-08-23 11:57:49 -03:00
Luna cf45f3f3ee fix body consume 2019-07-01 17:45:13 -03:00
Luna 11f810a5f3 add basic parameter parsing 2019-07-01 15:55:19 -03:00
Luna 4f7478d7b2 basic fndecl ast node working 2019-07-01 15:39:48 -03:00
Luna e2438f143b work towards FnDecl ast node 2019-07-01 15:25:07 -03:00
Luna b591ecdf9b fix identifier -> keyword conversion 2019-07-01 15:07:17 -03:00
Luna ac23c0d2d7 fix identifier lexemes 2019-07-01 15:06:53 -03:00
Luna b0e123f83a rm ast_printer 2019-07-01 15:02:14 -03:00
Luna 90f33e84fc remove old parser, work towards rewritten parser 2019-07-01 15:01:43 -03:00
Luna fa47bd7a7e fix for latest zig 2019-06-29 23:50:43 -03:00
Luna ff5a532c58 scanner: fix issues regarding peekNext 2019-06-06 01:28:10 -03:00
Luna f70f2ea1ae add basic parser 2019-06-05 22:06:12 -03:00
Luna 3becccfba8 revamp ast structure 2019-06-05 20:29:03 -03:00
Luna b040f47956 ast: change AstBinOp to use *AstNode instead of AstNode
using raw AstNode causes compile-errors due to recursion.
2019-06-04 23:53:55 -03:00
Luna c32b802765 ast: add some more love to pretty printer 2019-06-04 23:44:27 -03:00
Luna 71cef32fb0 add basic ast, parser files 2019-06-04 22:11:11 -03:00
Luna c19f6df834 split main code into a runner struct 2019-06-04 21:27:05 -03:00
Luna a44f04c7c8 scanner: finish off with identifiers and keywords 2019-06-04 21:16:25 -03:00
Luna 498ea72da4 add support for ++ and += 2019-06-04 18:07:46 -03:00
Luna 285f0b8410 add string support 2019-06-04 17:52:37 -03:00
Luna 8a9522d954 add multiline comment support 2019-06-04 17:40:13 -03:00
Luna 1e47b29685 fix scanner peek/peekNext 2019-06-04 17:28:48 -03:00
Luna 765cef87db add number and comment support 2019-06-04 17:24:07 -03:00
Luna 1453bef6c5 add nicer error handling, whitespace skipping 2019-06-04 15:18:52 -03:00
Luna 59083198c6 add basic scanner logic 2019-06-04 15:06:57 -03:00
Luna 3d243eefff add runPrompt / runFile / run functions 2019-06-03 23:12:16 -03:00
Luna ba9b1064f2 initial commit 2019-06-03 21:29:53 -03:00