Commit Graph

22 Commits

Author SHA1 Message Date
Nocturn9x 9babc75995 Fixed issues with some grammatical constructs, updated copyright year and minor changes to funDecl 2022-03-11 16:46:51 +01:00
Nocturn9x 43f5cea905 Initial experimental work on function declarations. Minor formatting fixes 2022-02-15 11:22:56 +01:00
Nocturn9x 8ed3cc7550 Fixed imports (whoops) 2022-01-31 15:18:06 +01:00
nocturn9x cb34a22a53 Fixed a bug in the debugger when visualizing encoded dictionary elements and simplified dispatching code inside Compiler.expression() for literals 2021-12-28 16:37:30 +01:00
Nocturn9x ed13304809 Began deserializing the constants table and the code section of bytecode files. Minor fixes to debugger and bytecode.nim 2021-12-17 17:54:22 +01:00
Nocturn9x f90f732a66 Added control flow (if/else) and looping (for/while). Changed all *Fast instructions so they don't contain the word 'Name' anymore, as they work with stack offsets and that wording could cause confusion. Fixed bug in the parser that caused for loops to produce the wrong AST 2021-11-21 12:50:41 +01:00
Nocturn9x a1698ef892 Fixed wrong bytecode emission when compiling constants. Added a few more checks and made dynamic declarations illegal inside local scopes again (will change once closures are implemented) 2021-11-20 18:12:49 +01:00
Nocturn9x 2ab4bdc46d Added multiple inline exception support for except handlers and updated grammar accordingly. Added scopeDepth field to parser to keep track of local scopes and emit some errors about declarations. Added some more docs to bytecode instructions, fixed some issues with local scopes in the compiler and made dynamic declarations legal in functions. Added a flag for disabling compiler optimizations 2021-11-20 13:19:57 +01:00
Nocturn9x 24c7b30271 Bugfixes to name resolution and scopes 2021-11-17 20:40:05 +01:00
Nocturn9x 352af30bee Added basic (untested) support for static and dynamic variable declarations. Minor fixes to main.nim 2021-11-17 19:05:03 +01:00
nocturn9x 44b52949e4 Fixed bug with collections 2021-11-13 20:47:46 +01:00
nocturn9x 15a2403120 Quality of life improvements and untested support for debugging the new BuildList/Set/Tuple/Dict instructions 2021-11-13 19:47:59 +01:00
Nocturn9x 5f33af5b2c Updated copyright notices to include contributors to the project 2021-11-13 11:32:48 +01:00
Nocturn9x 5cc2a60c8c Fixed many bugs in the serializer and added (de)serialization output to main.nim 2021-11-12 17:47:11 +01:00
Nocturn9x cdd529dbd0 Fixed some compiler bugs with emitting constants (bin/oct/hex), added string constants to literal() (whoopsie) and implemented basic serialization in Serializer.dumpBytes 2021-11-12 15:37:00 +01:00
Nocturn9x 23fe444a9e Added binary operations in compiler. Minor changes to bytecode spec. Initial ground work on the serializer 2021-11-12 13:29:26 +01:00
Nocturn9x ac8b21f21b Added support for unary + for consistency, initial working compiler for unary operations and literals (the optimizer has been disabled to show the work of the compiler) 2021-11-12 11:52:35 +01:00
nocturn9x e249f0bf7b Further ground work in the compiler 2021-11-08 10:14:46 +01:00
Nocturn9x a15aee3d23 Added temporary debugger 2021-10-30 15:05:04 +02:00
Nocturn9x 125e41864f Fixed license headers (whoops), started working on bytecode chunks, removed empty modules. Added config.nim and debugger.nim from japl v1 to start merging the two projects together 2021-10-30 14:38:46 +02:00
Nocturn9x a8bb212092 Updated copyright notices 2021-10-29 12:41:15 +02:00
nocturn9x 6625eda5ee Started to work on the optimizer and added skeleton for utility module 2021-09-27 17:45:26 +02:00