Commit Graph

2379 Commits

Author SHA1 Message Date
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
6ef438ce50 todo 2021-10-16 15:08:36 +02:00
Irmen de Jong
46e4b977a4 another attempt to fix Windows path issues 2021-10-16 15:02:15 +02:00
Irmen de Jong
9626c5dead attempt to fix Windows path issue with "library:" prefixes in AsmGen 2021-10-16 14:50:08 +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
0f80897c50 todo 2021-10-15 01:02:32 +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
e63cf660c6 petscii now use Result instead of Either 2021-10-13 23:22:46 +02:00
Irmen de Jong
aaff484306 refactor executeImportDirective 2021-10-13 23:14:27 +02:00
Irmen de Jong
3281d9a215 fix error when sourcepaths is empty 2021-10-13 23:08:51 +02:00
Irmen de Jong
0fcd61e00f refactor tryGetModuleFromResource 2021-10-13 23:00:22 +02:00
Irmen de Jong
c4523ea470 refactor tryGetModuleFromFile 2021-10-13 22:32:52 +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
4d27c2901b fix weird error printing when doing %import textio.p8 2021-10-13 21:55:51 +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
85b244df2f remove remains of %target 2021-10-13 20:13:57 +02:00
Irmen de Jong
6070afa6b6 cleanup SourceCode class 2021-10-13 19:16:01 +02:00
Irmen de Jong
975594703d doc 2021-10-13 18:21:48 +02:00
Irmen de Jong
6b8c3ef614 renamed command line option -libdirs to -srcdirs
this more clearly separates this meaning from the internal library modules
2021-10-13 18:16:51 +02:00
Irmen de Jong
ca3a990f9e todo 2021-10-13 01:33:29 +02:00
Irmen de Jong
557f4f689f doc 2021-10-13 00:50:54 +02:00
Irmen de Jong
66574d058a renamed InferredType.typeOrElse to getOr()
this is closer to the convention of most functional return types
2021-10-13 00:21:38 +02:00
Irmen de Jong
1c7c67060d better result and error handling for importModule() 2021-10-12 23:54:48 +02:00
Irmen de Jong
9827ee97ad better returnvalue/errorhandling for Petscii encoding 2021-10-12 23:26:45 +02:00
Irmen de Jong
71a9a84211 don't throw basic AstException but SyntaxError instead 2021-10-12 22:30:38 +02:00
Irmen de Jong
367a2a4cee cleaner return type 2021-10-12 22:21:38 +02:00
Irmen de Jong
4f7465ba44 better return types 2021-10-12 21:59:19 +02:00
Irmen de Jong
f891fc698c switched to more featureful Result library 2021-10-12 21:35:27 +02:00
Irmen de Jong
36bec62c9a Merge branch 'master' into v7.1 2021-10-12 20:28:44 +02:00
Irmen de Jong
dd5a2c8315 get rid of automated CI builds for now
the tests that actually run the compiler + assember don't work there (for now)
2021-10-12 20:27:25 +02:00
Irmen de Jong
56bff46481
Update gradle.yml 2021-10-12 18:19:07 +02:00
Irmen de Jong
b83a0adb19
Update gradle.yml 2021-10-12 18:17:50 +02:00
Irmen de Jong
92ffefe656
create github CI action to replace travis CI 2021-10-12 18:15:12 +02:00
Irmen de Jong
51b2e41879 libs updated to maven 2021-10-12 03:33:52 +02:00
Irmen de Jong
ef43bc9208 lib update 2021-10-12 02:33:34 +02:00
Irmen de Jong
33733a4001 improve errorhandling 2021-10-12 01:45:32 +02:00
Irmen de Jong
e5a1b37981 simplify 2021-10-12 01:22:17 +02:00
Irmen de Jong
30aa72dc8e fix unittest and use kotlin.test method to test for exceptions 2021-10-11 21:22:06 +02:00