Commit Graph

31 Commits

Author SHA1 Message Date
Mattia Giambirtone b99be47556 Added compilation mode flag 2022-11-23 10:40:45 +01:00
Mattia Giambirtone 9567319c40 Major error formatting refactoring. Improved warning system 2022-11-23 01:02:35 +01:00
Mattia Giambirtone e09db61bc6 Fixed support for type declarations in the parser 2022-11-04 14:56:42 +01:00
Mattia Giambirtone d33a597f19 Massive improvements to import system (added export statement, initial work on namespaces, module names can now be paths, added module search paths) 2022-10-17 11:28:00 +02:00
Mattia Giambirtone c230142378 Broken work with closures and chained calls 2022-08-30 12:55:14 +02:00
Mattia Giambirtone 77fd5931fa Further clean up 2022-08-17 19:31:27 +02:00
Mattia Giambirtone 33066d3b9b Fixed bug with calling a call 2022-07-31 16:09:22 +02:00
Mattia Giambirtone 60028ed664 Fixed issues when debugSerializer == true 2022-07-10 16:31:30 +02:00
Mattia Giambirtone 3f5f514259 Fixed some issued with scoping and globals 2022-07-09 13:36:29 +02:00
Mattia Giambirtone 95880b7ba2 Updated .gitignore, slightly edited README and added some more tests 2022-06-19 14:45:38 +02:00
Mattia Giambirtone 5d572386a3 Initial work on pragma handling (+ some parser fixes). Changed the way the lexer handles indentation and made tabs illegal. Added instructions for some operations on primitive types, removed file argument from serializer 2022-06-14 12:12:56 +02:00
Mattia Giambirtone dac0cca1bc Initial experimental support for parsing pragmas 2022-06-07 11:23:08 +02:00
Mattia Giambirtone aed0f6e8f2 Initial work on type declarations 2022-06-02 14:23:05 +02:00
Mattia Giambirtone 9c14bfae91 Initial work on generics, fixed StoreVar. declareName no longer emits any bytecode (as it doesn't need to) 2022-05-23 11:53:34 +02:00
Mattia Giambirtone 21a9689f6c Functions can now return functions which return functions... recursively. Initial work on forward declarations and function call resolution 2022-05-22 15:27:28 +02:00
Mattia Giambirtone 7cf69cf0cf Added hasExplicitReturn field to function and lambda declarations to fix some errors with compiling them. Fixed minor issues with function and lambda parsing, the parser is now able to skip whitespace/tab tokens trasparently, made parser.done() inline, removed invalid state error from funDecl 2022-05-21 12:20:12 +02:00
Mattia Giambirtone cb21af4aa3 Added Makefile, prettyfied code, initial work on pragmas 2022-05-18 13:32:32 +02:00
Mattia Giambirtone 620c56237a Fixed an issue with jump offsets and with functions return types 2022-05-16 19:23:38 +02:00
Mattia Giambirtone e823a459c8 Implemented jump opcodes and LoadUInt64 in the VM, some style and proc changes in the compiler, chunk constants are now type-aware, fixed various inheritance mistakes in the AST node, refined type inference system, moved types back to the compiler and completely redesigned operator parsing to be more modular 2022-05-07 10:48:42 +02:00
Mattia Giambirtone a1c5430773 Collections are no longer a compiler intrinsic. Added parser support for ptr/ref arguments 2022-05-04 14:01:38 +02:00
Mattia Giambirtone b4fffe18aa Completely reworked the type inference system. Initial work on specializing the constants table in the bytecode chunk 2022-05-02 17:26:38 +02:00
Mattia Giambirtone f2b60bd9c4 Experimental support for multiple arguments of the same type using only one type declaration + various compiler fixes 2022-05-01 13:08:02 +02:00
Mattia Giambirtone 776968bffc Name stropping, added NoOp, minor AST fixes, removed builtin opcodes for most operations 2022-04-29 23:04:53 +02:00
Mattia Giambirtone 0e4eb82554 Fixed AST inheritance issues and got back to a working state 2022-04-28 11:50:10 +02:00
Mattia Giambirtone f26541d4ae BROKEN: Initial work on closed-over variables and attempt to cleanup the AST type structure 2022-04-27 16:03:48 +02:00
Mattia Giambirtone 79ca72d983 Initial work on type inference and variable declarations. Minor changes to the optimizer 2022-04-21 15:25:29 +02:00
Mattia Giambirtone e02f159514 Initial work on inferring types 2022-04-12 12:18:25 +02:00
Mattia Giambirtone 025f8b463b Fixed parsing of argument-less function. Removed main.nim 2022-04-12 10:56:05 +02:00
Mattia Giambirtone a388333278 Hooked up old JAPL components 2022-04-07 15:06:15 +02:00
Mattia Giambirtone dbab30952b Initial work on adding type support to the parser for declarations + fixes for lambdas 2022-04-05 15:52:58 +02:00
Mattia Giambirtone 76812a2091 Initial commit from JAPL with some changes 2022-04-04 12:29:23 +02:00