Commit Graph

  • ba9c8b4e56 Fixed parsing code in funDecl for arguments, fixed funDecl in compiler master Nocturn9x 2022-03-21 15:40:13 +0100
  • 1da75aed5c Empty VM module Nocturn9x 2022-03-21 15:05:11 +0100
  • bfc2695771 Added type dispatching module Nocturn9x 2022-03-21 15:04:59 +0100
  • 10df2d3c17 Initial work on the type system. Added ImplicitReturn bytecode optimization. Made checkDecl a template instead of a procedure Nocturn9x 2022-03-21 15:04:45 +0100
  • 1afe2f2f47 Renamed pointr to p in memory/allocator.nim Nocturn9x 2022-03-14 09:10:52 +0100
  • 13a6d71cfa Minor formatting and language changes to bytecode spec Nocturn9x 2022-03-14 09:09:42 +0100
  • bfdfb73fc9 The else clause now must be located right after the last except clause in try blocks Nocturn9x 2022-03-14 08:53:23 +0100
  • 9babc75995 Fixed issues with some grammatical constructs, updated copyright year and minor changes to funDecl Nocturn9x 2022-03-11 16:03:51 +0100
  • 8e94891d37 Added implicit nil return from functions, JumpIfFalseOrPop opcode, error handling for overflowing collection literals, getStaticIndex now returns negative stack index for closed-over variables and variable() emits LoadHeap instructions for them Nocturn9x 2022-03-10 17:56:21 +0100
  • 43f5cea905 Initial experimental work on function declarations. Minor formatting fixes Nocturn9x 2022-02-15 11:22:56 +0100
  • 8ceea4e84f Initial dummy/template work on defer Nocturn9x 2022-02-14 17:49:15 +0100
  • 28c6032458 Initial work on function and class declarations Nocturn9x 2022-02-14 17:36:17 +0100
  • 65053b7a05 Updates to the bytecode spec. Started working a bit on the type system Nocturn9x 2022-02-03 15:14:31 +0100
  • 6e2070899b Minor fixes to error reporting Nocturn9x 2022-01-31 15:21:46 +0100
  • 8ed3cc7550 Fixed imports (whoops) Nocturn9x 2022-01-31 15:18:06 +0100
  • 776a2241f7 Readded frontend Nocturn9x 2022-01-31 15:14:26 +0100
  • a545341428 Swapped frontend and backend directories (wrong naming) Nocturn9x 2022-01-31 15:14:08 +0100
  • 633c032601 Added Ctrl+E and Ctrl+A bindings Nocturn9x 2022-01-31 15:10:53 +0100
  • 29df939df3 Added some frontend stuff nocturn9x 2022-01-10 11:53:41 +0100
  • 3df9bdc88f Removed debugging raise statement nocturn9x 2022-01-10 11:53:14 +0100
  • 44cce0a380 Minor changes to the compiler nocturn9x 2022-01-07 10:57:15 +0100
  • fec05a1291 Merge branch 'master' of https://github.com/japl-lang/JustAnotherJAPL nocturn9x 2022-01-06 16:53:50 +0100
  • ef69de00fd Updated config.nim nocturn9x 2022-01-06 16:53:32 +0100
  • fdfe87ad42 Fixed a bug in patchJump(). Added basic functionality for many keywords. Initial work on continue and break nocturn9x 2022-01-06 16:53:06 +0100
  • 3b81831bc9
    Update README.md Mattia 2022-01-04 18:01:19 +0100
  • 1670ff1518
    Update README.md Mattia 2022-01-04 17:57:42 +0100
  • e5173435f5 Added del statement nocturn9x 2022-01-04 17:51:59 +0100
  • 19df7e84a1 Added support for in-place operators, removed all inplace opcodes, renamed DeleteNameFast to DeleteFast and the Update* opcodes to Store*. Updated grammar accordingly nocturn9x 2021-12-30 16:03:29 +0100
  • 6070d69d00 Integrated jale inside the test REPL for nicer behavior nocturn9x 2021-12-28 16:47:20 +0100
  • cb34a22a53 Fixed a bug in the debugger when visualizing encoded dictionary elements and simplified dispatching code inside Compiler.expression() for literals nocturn9x 2021-12-28 16:37:30 +0100
  • 71dfac87dd Minor QoL improvements to main.nim nocturn9x 2021-12-26 20:05:44 +0100
  • 0a3d93512c Updated commit in config.nim nocturn9x 2021-12-22 17:22:27 +0100
  • e234c8caaf Removed serialization for singletons as those are encoded as bytecode instructions (whoopsie), and updated the bytecode spec accordingly. Added minor QoL improvements to the parser/compiler REPL nocturn9x 2021-12-22 17:13:03 +0100
  • 303a98b9e4 Removed leftover raise statements (whoops) nocturn9x 2021-12-22 16:23:18 +0100
  • 44fdfe50a6 Updated commit in config.nim nocturn9x 2021-12-22 16:22:31 +0100
  • bfacd24bce Fixed string serialization and reverted .escape() call in AST and Token string representation nocturn9x 2021-12-22 16:21:56 +0100
  • ed13304809 Began deserializing the constants table and the code section of bytecode files. Minor fixes to debugger and bytecode.nim Nocturn9x 2021-12-17 17:54:22 +0100
  • 195045e4f2 Minor additions and fixes (preparation for break and continue in the compiler) nocturn9x 2021-12-11 15:57:28 +0100
  • 302acbcaae Updated config.nim Nocturn9x 2021-11-21 12:51:56 +0100
  • 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 Nocturn9x 2021-11-21 12:50:41 +0100
  • 12afed8419 Initial work on bytecode code section Nocturn9x 2021-11-21 11:37:20 +0100
  • 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) Nocturn9x 2021-11-20 18:12:49 +0100
  • 690d4d364a Added a brief description of what JAPL adds on top of lox Nocturn9x 2021-11-20 17:43:26 +0100
  • 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 Nocturn9x 2021-11-20 13:17:16 +0100
  • 9160cb32db Updated config.nim Nocturn9x 2021-11-17 21:15:08 +0100
  • 93fdb6bd10 Statically resolved locals are now popped off the stack (whoops) Nocturn9x 2021-11-17 21:14:41 +0100
  • 2582d18596 Updated config.nim Nocturn9x 2021-11-17 20:42:56 +0100
  • 24c7b30271 Bugfixes to name resolution and scopes Nocturn9x 2021-11-17 20:39:29 +0100
  • 352af30bee Added basic (untested) support for static and dynamic variable declarations. Minor fixes to main.nim Nocturn9x 2021-11-17 19:05:03 +0100
  • 77224d707c Added encoding for collections Nocturn9x 2021-11-17 12:10:14 +0100
  • fa2e19583d Removed debugging echo statements Nocturn9x 2021-11-16 15:50:01 +0100
  • 51246d552f Updated commit hash in config.nim Nocturn9x 2021-11-16 15:48:50 +0100
  • 1515a53cd0 Initial support for global dynamic variable declarations Nocturn9x 2021-11-16 15:46:43 +0100
  • 8c3b98f0c6 Added ownership field to declarations Nocturn9x 2021-11-16 15:21:05 +0100
  • 3b08932403 Improved error handling for declarations inside functions Nocturn9x 2021-11-16 13:32:12 +0100
  • 7194e937fb Added lexical specification for augmented (aka inplace) assignment Nocturn9x 2021-11-16 13:31:52 +0100
  • 09766ab243 Added missing exports Nocturn9x 2021-11-15 14:27:32 +0100
  • 8bac5fe657 Fixed typos, added more docs. Renamed Local in compiler.nim to a more generic Name. Removed 'raise' from main.nim Nocturn9x 2021-11-15 14:26:31 +0100
  • 44b52949e4 Fixed bug with collections nocturn9x 2021-11-13 20:47:46 +0100
  • 1b3ae004bc Fixed crash when the input file is empty nocturn9x 2021-11-13 20:00:13 +0100
  • 2d9260fc95 Made the commit hash truncation 1 byte longer for consistency with JAPL's help message nocturn9x 2021-11-13 19:50:18 +0100
  • 087443c7f9 Removed 'raise' statement from loop nocturn9x 2021-11-13 19:48:38 +0100
  • 318e72b9e1 Compiler support for BuildList, BuildSet, BuildDict and BuildTuple nocturn9x 2021-11-13 19:48:17 +0100
  • 15a2403120 Quality of life improvements and untested support for debugging the new BuildList/Set/Tuple/Dict instructions nocturn9x 2021-11-13 19:47:59 +0100
  • 4f400d7aab Changed all references of NimVM to JAPL's nocturn9x 2021-11-13 19:47:22 +0100
  • 5f33af5b2c Updated copyright notices to include contributors to the project Nocturn9x 2021-11-13 11:32:48 +0100
  • 014f20bfe8 Finally fixed README Nocturn9x 2021-11-12 18:42:55 +0100
  • 5cc2a60c8c Fixed many bugs in the serializer and added (de)serialization output to main.nim Nocturn9x 2021-11-12 17:47:11 +0100
  • afa4369321 Made the serializer follow the spec (the 3 byte header was missing) Nocturn9x 2021-11-12 16:56:41 +0100
  • df67e7db64 Initial work for loadBytes and removed dumpBytes Nocturn9x 2021-11-12 16:35:55 +0100
  • 3d4680e94d Updated bytecode spec to take singletons into account Nocturn9x 2021-11-12 16:27:12 +0100
  • 3fde477de6 Added serialization for singletons and updated bytecode spec Nocturn9x 2021-11-12 16:15:18 +0100
  • cdd529dbd0 Fixed some compiler bugs with emitting constants (bin/oct/hex), added string constants to literal() (whoopsie) and implemented basic serialization in Serializer.dumpBytes Nocturn9x 2021-11-12 15:37:00 +0100
  • b252749d0e Added compiler support for collection literals Nocturn9x 2021-11-12 14:19:58 +0100
  • 23fe444a9e Added binary operations in compiler. Minor changes to bytecode spec. Initial ground work on the serializer Nocturn9x 2021-11-12 13:29:13 +0100
  • 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) Nocturn9x 2021-11-12 11:52:35 +0100
  • e249f0bf7b Further ground work in the compiler nocturn9x 2021-11-08 10:14:46 +0100
  • 08f68f09df Added opcodes to build collection literals nocturn9x 2021-10-31 10:43:45 +0100
  • 033aac50c2 Further initial work on the compiler + fixed some parsing bugs with unterminated collection literals. Added initial serializer module for bytecode caching to file. Made token objects value types nocturn9x 2021-10-31 10:41:42 +0100
  • 53741cb0df Started ground work for the compiler Nocturn9x 2021-10-30 13:21:54 +0200
  • df59bc8f0d Fixed bug in the optimizer when folding exponentiation with negative exponents Nocturn9x 2021-10-30 11:48:46 +0200
  • a15aee3d23 Added temporary debugger Nocturn9x 2021-10-30 15:05:04 +0200
  • 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 Nocturn9x 2021-10-30 14:38:46 +0200
  • cce5047a61 Got rid of Parser.context attribute (using Parser.currentFunction now) and added basic docs on the Parser object Nocturn9x 2021-10-29 19:51:09 +0200
  • a8bb212092 Updated copyright notices Nocturn9x 2021-10-29 12:41:15 +0200
  • ce3fbe6ced Fixed bug that always parsed function bodies as empty blocks Nocturn9x 2021-10-29 12:38:59 +0200
  • fd336b5761 Minor documentation change in the lexer Nocturn9x 2021-10-29 12:35:47 +0200
  • d81948ed23 Significantly improved generator/coroutine detection in the parser, extending it to all expressions variants. Fixed a bug where the lexer would spin up an infinite loop with unterminated string literals Nocturn9x 2021-10-29 12:33:07 +0200
  • 759c4a4214 Updared grammar for try statement Nocturn9x 2021-10-29 11:47:18 +0200
  • f80ac42101 Minor changes to error message for missing initializer in constant declaration Nocturn9x 2021-10-29 10:51:27 +0200
  • d905f319b2 Ehnanced generator detection code Nocturn9x 2021-10-29 10:34:07 +0200
  • 48087419b2 Improved error handling and parsing for try statements Nocturn9x 2021-10-29 09:54:38 +0200
  • 73020fd48b Added exception handling parse handlers and slicing support Nocturn9x 2021-10-28 15:48:23 +0200
  • c1a0ecca91 Minor reordering and numerous small fixes to grammar. Added try/except/finally/else syntax Nocturn9x 2021-10-28 09:57:03 +0200
  • dc7c6b5f6d Added parser support for the 'defer' keyword Nocturn9x 2021-10-27 18:47:16 +0200
  • 16f1ffb7d0 Added lambda functions as expressions. Added 'as', 'is' and 'of' binary operators. Added collection literals. Renamed isLiteral to isConstant to better reflect usage. Added isLiteral for all literals, including collections. Fixed some edge cases with nested function scopes. Simplified some representation of AST nodes nocturn9x 2021-10-24 19:08:17 +0200
  • e6dbc3cad6 Added 'is', 'as' and 'of' nocturn9x 2021-10-24 17:01:03 +0200
  • d0a252e13c Fixed assignment expression, made lambda an expression nocturn9x 2021-10-24 16:39:12 +0200
  • 151b8da0d5 Initial (semi-broken) support for await and yield statements/expressions. Minor changes to the lexer and grammar Nocturn9x 2021-10-25 11:50:12 +0200
  • 74b8328bf7 Implemented yield expressions vs yield statements Nocturn9x 2021-10-23 12:51:30 +0200