Commit Graph

58 Commits

Author SHA1 Message Date
prod2 09a66b7306 removed old compiler 2022-12-03 20:05:59 +01:00
prod2 57b3a4863e new compiler now passes test suite, after outdated tests were refactored to match new precedence rules 2022-12-03 20:04:44 +01:00
prod2 8c90b669e8 emitting variables, scopes 2022-12-03 15:55:47 +01:00
prod2 3a73ed75ec add key: val syntax to tables, update tests to match replacement of -> with : 2022-12-03 13:16:47 +01:00
prod2 c812d33a77 wrong precedence fixed 2022-12-03 13:11:46 +01:00
prod2 41e21733d3 control flow emitting 2022-12-03 13:07:05 +01:00
prod2 ef794ea881 add dump AST, make AST printing cleaner 2022-12-03 12:19:35 +01:00
prod2 04dd2bf73f Simplify config
- made assertions always enabled, since they already pretty much were
- removed debug compiler/scanner since the whole thing was messy, and not present in compv2
2022-12-03 12:08:41 +01:00
prod2 3405c10b08 basic emitter in place 2022-12-03 11:52:51 +01:00
prod2 27391bdc43 parsing break, var decl 2022-12-03 09:39:26 +01:00
prod2 1e139194b8 block expressions, improved error reporting 2022-12-03 09:32:41 +01:00
prod2 c36292843a update compv1, remove def from compv1 2022-12-03 09:02:43 +01:00
prod2 a0e5431b0f parsing procs 2022-12-02 21:08:52 +01:00
prod2 e83cd424f9 backtrack in parser + ampersand op support 2022-12-02 20:47:31 +01:00
prod2 b858a066e2 colonCall parsing 2022-12-02 19:27:02 +01:00
prod2 f721d0987d parser progress 2022-12-02 19:14:41 +01:00
prod2 e6a48ccee6 compiler rewrite start
updated readme accordingly
created node.nim in compv2
changed nds.nim - setup for debugging the parser for now
2022-12-02 15:45:34 +01:00
prod2 c21c797ef4 update 2022-12-02 12:09:10 +01:00
prod2 70fa10bfa6 readding inline to some stack.nim procs 2022-02-14 10:46:49 +01:00
prod2 856d1345e4 init the globals table with a larger init cap 2022-02-14 10:33:10 +01:00
prod2 197d61b112 remove broken closure listing 2022-02-14 07:16:58 +01:00
prod2 545322bf96 Revert "BROKEN gc"
This reverts commit 0f9440dfb0.
2022-02-14 07:15:11 +01:00
prod2 0f9440dfb0 BROKEN gc 2022-02-10 06:44:16 +01:00
prod2 5963a25f37 def declaration of procedures 2022-02-10 00:35:29 +01:00
prod2 f86cce7977 use stack instead of frames to find current closure 2022-02-09 07:06:40 +01:00
prod2 f79f4e47ba rename funct to proc 2022-02-09 06:58:51 +01:00
prod2 3a9e23b82e implicit return in blocks 2022-02-09 06:55:34 +01:00
prod2 431e8f9a66 implicit return for functions 2022-02-09 06:47:00 +01:00
prod2 a16026b364 utf8 support 2022-02-08 10:10:07 +01:00
prod2 ece31b11e0 -> method call 2022-02-08 09:23:21 +01:00
prod2 5f3f61af2d change table declaration syntax 2022-02-08 08:56:47 +01:00
prod2 8262ca187c sugars: :: and table . op; allow for reading existing locals of the same name in var statements 2022-02-08 08:13:38 +01:00
prod2 2517439caf mark compiler modules as used, make nimble test rebuild in release mode, make release mode enable all assertions and bounds checks 2022-02-08 06:04:39 +01:00
prod2 d4a6921302 split up expression.nim 2022-02-08 05:50:36 +01:00
prod2 960be5f0dd split up compiler into multiple files 2022-02-08 05:41:05 +01:00
prod2 954d1e6de4 expand natives 2022-02-07 06:03:47 +01:00
prod2 9dc429c92d natives 2022-02-07 05:35:07 +01:00
prod2 d5479a0be7 closures work - test passes now 2022-02-06 10:04:49 +01:00
prod2 85aa396054 WIP on closures: single layer closures work, nested closures still broken 2022-02-06 07:35:00 +01:00
prod2 392955e290 WIP closures: unclosed upvalues work; improved vm debugging and changed $ for functions, closures 2022-02-06 04:59:39 +01:00
prod2 f453de631d wip closures: dedupliacation of upvalue references 2022-02-06 04:21:32 +01:00
prod2 086c6e3c2e WIP closures, fix compiler bug 2022-02-06 03:49:36 +01:00
prod2 2f790067f3 optimization: inline some things that were procs 2022-02-06 02:46:26 +01:00
prod2 62995df504 fix string concat 2022-02-06 01:02:22 +01:00
prod2 c04d520561 expand closures test 2022-02-05 12:56:07 +01:00
prod2 9b3b1056ba WIP closures + important bugfix 2022-02-05 12:37:54 +01:00
prod2 3e48b1cc52 WIP closures 2022-02-05 12:30:07 +01:00
prod2 0c4a6553ff factorial benchmark 2022-02-05 06:10:37 +01:00
prod2 af2f639ccc new benchmark, constant reuse (to better fit in the constant limit) 2022-02-05 05:52:45 +01:00
prod2 05887323c0 new test, bugfix 2022-02-05 03:24:30 +01:00