Commit Graph

255 Commits

Author SHA1 Message Date
Mattia Giambirtone 42ba738620
Added 'is' identity operator and implemented equality for booleans 2023-05-01 16:37:33 +02:00
Mattia Giambirtone de9b51152e
Fixed issue with resuming from incremental compilation 2023-05-01 16:27:00 +02:00
Mattia Giambirtone dc195409c9
Removed old note about pointer tagging 2023-05-01 16:07:41 +02:00
Mattia Giambirtone cd853bb140 Reverted variable hoisting and fixed minor issue during name resolution. Updated comments 2023-05-01 15:30:55 +02:00
Mattia Giambirtone a706fdad7a
Made VM helpers pure 2023-03-27 19:14:22 +02:00
Mattia Giambirtone a7899e8473
Fixed bug with globals and hoisted global declarations 2023-03-27 19:08:58 +02:00
Mattia Giambirtone 3e9b84fb4f
Got rid of pointer tagging (was probably useless) 2023-03-27 18:33:00 +02:00
Mattia Giambirtone 2d9a6b9a8d
Incremental compilation now works in the REPL 2023-03-27 17:57:18 +02:00
Mattia Giambirtone 8277472819
Initial work on the new compiler module 2023-03-27 09:53:56 +02:00
Mattia Giambirtone 32ae21d143 Forbid use of automatic types in lambdas 2023-03-07 11:41:37 +01:00
Mattia Giambirtone e926696953 Super clunky lambda implementation 2023-03-05 16:49:14 +01:00
Mattia Giambirtone 97698b28af Initial work on fixing lambdas and minor improvements to error reporting 2023-03-04 12:13:19 +01:00
Mattia Giambirtone 47ac1be6aa Merge branch 'gc-upgrade' into compiler-refactor 2023-02-25 17:37:32 +01:00
Mattia Giambirtone f4752a9f7c Added pointer tagging to GC to resolve potential memory leak 2023-02-25 17:35:57 +01:00
Mattia Giambirtone f2dbfcbd0a Simplified GC implementation by removing unnecessary metadata 2023-02-25 16:17:38 +01:00
Mattia Giambirtone 197367edae Merge branch 'compiler-refactor' of https://git.nocturn9x.space/nocturn9x/peon into compiler-refactor 2023-02-11 13:44:52 +01:00
Mattia Giambirtone c69daba89a Removed unnecessary old code from the lexer 2023-02-08 17:55:44 +01:00
Mattia Giambirtone f284da7691 Fixed minor bug in the REPL 2023-02-02 15:29:41 +01:00
Mattia Giambirtone 81e10ae1ea Reformatted help menu, added -w option. All code can now be disassembled 2023-01-26 12:11:29 +01:00
Mattia Giambirtone c666c66813 Added short type aliases to peon stdlib + minor comment fixes 2023-01-24 12:22:26 +01:00
Mattia Giambirtone bf2be7deac Minor documentation changes 2023-01-24 12:19:06 +01:00
Mattia Giambirtone f10d813414 Added visibility checks to forward declarations 2023-01-24 12:08:29 +01:00
Mattia Giambirtone d16d4d5977 Minor changes and fixes 2023-01-23 01:12:09 +01:00
Mattia Giambirtone dccaf7dda4 Minor changes and additions to comments 2023-01-22 18:02:31 +01:00
Mattia Giambirtone d1d5c10e49 Fixed issue with self-referencing variable declarations 2023-01-22 17:58:52 +01:00
Mattia Giambirtone ace04ee34c Minor additions and cleanup 2023-01-17 12:53:23 +01:00
Mattia Giambirtone e97653cbc7 Initial ground work on typed AST, minor fixes to compiler, switch statement now looks for equality operator instead of emitting the Equal opcode 2023-01-05 12:44:11 +01:00
Mattia Giambirtone 14f58921a5 Minor stylistic updates to CLI interface 2022-12-16 15:29:13 +01:00
Mattia Giambirtone 8cad266651 Updated help menu in config.nim 2022-12-16 15:23:32 +01:00
Mattia Giambirtone 382244f7a7 Added -o/--output option 2022-12-16 15:19:38 +01:00
Mattia Giambirtone cf6d20e757 Added mutateOuterScope to noWarn option, improved error formatting, added backend flag, updated help menu 2022-12-16 15:11:20 +01:00
Mattia Giambirtone ffe57c134a Minor improvements to modularization (moved even more procedures to generalized methods) 2022-12-16 14:32:20 +01:00
Mattia Giambirtone db021cb821 Initial ground work on the C backend 2022-12-15 16:49:27 +01:00
Mattia Giambirtone 385701ab83 Minor change (all test suite is passing) 2022-12-15 13:32:17 +01:00
Mattia Giambirtone 76ee8c7454 Further work on compiler modularization: converted expression handlers to methods 2022-12-15 13:22:34 +01:00
Mattia Giambirtone dc393bbb34 Initial work on multi-backend support 2022-12-15 11:48:43 +01:00
Mattia Giambirtone b912d58cad Peon bytecode files can now be executed directly 2022-12-09 13:42:52 +01:00
Mattia Giambirtone f86925edba Minor improvements to warning messages 2022-12-09 13:40:02 +01:00
Mattia Giambirtone f1875736e3 Added switch statements 2022-12-07 09:15:29 +01:00
Mattia Giambirtone af3c7234be Added template support and related test 2022-12-06 12:55:17 +01:00
Mattia Giambirtone 70cfb0d89c More bug fixing, added extra test 2022-12-06 10:59:05 +01:00
Mattia Giambirtone d7d561f45e Updated REPL to be more forgiving once errors occur 2022-12-05 19:56:00 +01:00
Mattia Giambirtone 01355fdaba Minor fixes and changes 2022-12-05 19:19:38 +01:00
Mattia Giambirtone 7ebd13f739 Fixed bugs in automatic types 2022-12-05 17:09:09 +01:00
Mattia Giambirtone 6caaf7e707 Added error handling for using auto in a generic constraint 2022-12-05 12:13:21 +01:00
Mattia Giambirtone 572443a988 Added support for automatic types 2022-12-05 12:06:24 +01:00
Mattia Giambirtone c0f358e956 Fixed bugs with blocks 2022-12-05 08:47:14 +01:00
Mattia Giambirtone 4b6d86ad8e Added named blocks 2022-12-05 08:07:37 +01:00
Mattia Giambirtone 15ec8dce54 Fixed error reporting in REPL 2022-12-04 17:02:32 +01:00
Mattia Giambirtone 21738b9382 Removed broken closure implementation, changed local resolution mechanism, many bug fixes to namespaces and tests 2022-12-04 16:54:28 +01:00