Commit Graph

193 Commits

Author SHA1 Message Date
Irmen de Jong
23961f695d fixed some parse tree node position end-columns. cleanup some todo's 2021-11-05 22:48:28 +01:00
Irmen de Jong
7e287a5359 proper parent node linkage in generated const values out of typecast expressions. Fixes crash mentioned in #72 2021-11-02 00:47:01 +01:00
Irmen de Jong
1110bd0851 fix vardecl initialization value to not use stack eval anymore but separate assignment
(this causes the optimized assignment code gen to be used instead)
but some programs now end up larger in output size
2021-11-01 00:24:15 +01:00
Irmen de Jong
1b576f826d remove unneeded sibling methods 2021-10-31 16:50:15 +01:00
Irmen de Jong
dfbef8495d got rid of ParsingFailedError 2021-10-30 17:05:23 +02:00
Irmen de Jong
97836e18b2 simplified gradle config, automatically run installDist task after build 2021-10-30 12:01:52 +02:00
Irmen de Jong
7b69df4db2 todos 2021-10-30 00:38:48 +02:00
Irmen de Jong
3767b4bbe7 'Program' is not an ast Node 2021-10-30 00:25:34 +02:00
Irmen de Jong
d7d2eefa4f implemented CharLiteral.constValue() 2021-10-30 00:05:55 +02:00
Irmen de Jong
3da9404c2d removed memsizer arg from all builtin functions 2021-10-29 23:38:31 +02:00
Irmen de Jong
495a18805c move asmgen test to codeGeneration module 2021-10-29 16:20:53 +02:00
Irmen de Jong
0b5ddcdc9b split out the code generator into own project submodule 2021-10-29 05:00:30 +02:00
Irmen de Jong
5ff481ce3c make sure tmp folders exist for unit tests 2021-10-29 03:04:16 +02:00
Irmen de Jong
f21dcaa6fb split out the code optimizers into own project submodule 2021-10-29 02:42:10 +02:00
Irmen de Jong
2c940de598 better name 2021-10-29 01:06:01 +02:00
Irmen de Jong
ce75b776bb refactor loadAsmIncludeFile response 2021-10-29 01:01:24 +02:00
Irmen de Jong
7d22b9b9f9 simplified name conflict check for sub params 2021-10-29 00:20:33 +02:00
Irmen de Jong
6cb8b3b5cd removed unneeded scope param from lookup() 2021-10-29 00:01:28 +02:00
Irmen de Jong
2bf4017f2b fix nested label lookups in anon scopes
fixed non-global qualified names lookup
2021-10-28 23:48:01 +02:00
Irmen de Jong
08d2f8568b refactoring symbol lookups 2021-10-27 23:48:12 +02:00
Irmen de Jong
ac5f45d2d4 fix nested label lookups in anon scopes (partly) 2021-10-27 02:41:24 +02:00
Irmen de Jong
9684f4e42a add unit tests for AnonScope refactoring, cleaned up imports 2021-10-27 00:05:46 +02:00
Irmen de Jong
141689e697 change many uses of .definingScope to just the parent node 2021-10-26 23:25:16 +02:00
Irmen de Jong
743c8b44a2 AnonymousScope refactor: it's no longer a INameScope
because it doesn't contain scoped variables (these are moved to the subroutine's scope)
2021-10-26 23:01:51 +02:00
Irmen de Jong
69a8813a3d first steps to add support for str parameter type 2021-10-24 20:57:10 +02:00
Irmen de Jong
35e88dd529 (7.2) correctly parse datatype of array parameters 2021-10-21 22:06:21 +02:00
Irmen de Jong
4d5094a517 (7.2) cleanup Petscii converter errorhandling, add unit tests for error scenarios 2021-10-20 23:48:20 +02:00
Irmen de Jong
dd5abae721 move testcase to proper location 2021-10-20 23:08:40 +02:00
Irmen de Jong
82d3d81bb2 don't want to complicate things by introducing a boolean literal 2021-10-19 23:58:50 +02:00
Irmen de Jong
82d20dea39 a few comment and TODO cleanups.
remove remark about chars UBYTE type, kotlin's closest native type that can contain 0-255 is a short.
2021-10-19 23:20:34 +02:00
Irmen de Jong
5afa7e53f8 got rid of program arg for isInRegularRAM 2021-10-19 22:30:30 +02:00
Irmen de Jong
7f15b7b716 remove unneeded check for duplicate module names as this is now caught by the logic in Program.addModule itself 2021-10-19 22:12:54 +02:00
Irmen de Jong
552e0c2248 rename mainModule to toplevelModule.
failed module no longer retains in the Ast.
improved some tests on that.
2021-10-19 21:49:05 +02:00
Irmen de Jong
e5b9e1f5e7 string object identity hashcode can be negative sometimes, so allow a '-' character. 2021-10-19 21:08:15 +02:00
Irmen de Jong
502bf90007 comments 2021-10-19 01:12:28 +02:00
Irmen de Jong
40bf117497 avoid crash when parser doesn't report an offending token for a parse error 2021-10-19 00:44:33 +02:00
Irmen de Jong
4011dce31b added a few more tests for the file element of Position 2021-10-19 00:26:02 +02:00
Irmen de Jong
cf0e395921 got rid of SourceCode.pathString() and the 'need' to strip < and > 2021-10-16 17:15:22 +02:00
Irmen de Jong
46e4b977a4 another attempt to fix Windows path issues 2021-10-16 15:02:15 +02:00
Irmen de Jong
aea364e43d paths are now always relative to the current directory. Fixes #64 2021-10-16 14:26:33 +02:00
Irmen de Jong
06defd0cb0 paths are now always relative 2021-10-16 02:43:22 +02:00
Irmen de Jong
57bb1c2c0d performance optimized checks against short ranges of values 2021-10-15 00:51:45 +02:00
Irmen de Jong
7b35b414e8 tweak check of DataType against multiple values 2021-10-15 00:39:42 +02:00
Irmen de Jong
761aac7a23 replace inferredType.istype() by infix form 2021-10-15 00:28:23 +02:00
Irmen de Jong
15a02d7664 making InferredType easier to use 2021-10-15 00:18:13 +02:00
Irmen de Jong
16ed68c1ec Module.name is now derived back from the source's origin string 2021-10-14 23:58:14 +02:00
Irmen de Jong
0447b3e4cc remove testcase that attempted to check invalid %import syntax.
we only allow unquoted names, without filename suffix, in %import.
2021-10-13 22:10:35 +02:00
Irmen de Jong
855e18b31c fix SourceCode to properly set the sourceName of a resource or string as well 2021-10-13 21:46:38 +02:00
Irmen de Jong
d790878af6 enabled test 2021-10-13 20:28:42 +02:00
Irmen de Jong
6070afa6b6 cleanup SourceCode class 2021-10-13 19:16:01 +02:00