Commit Graph

2536 Commits

Author SHA1 Message Date
meisl
d3e026d82a +/* non-unique module names: provide more info, add TODO 2021-07-09 13:44:44 +02:00
meisl
fa5ecd6495 * refactor ModuleImporter: throw the proper NoSuchFileException if import isn't found, return SourceCode? from both, tryGetModuleFromResource and tryGetModuleFromFile 2021-07-09 13:44:24 +02:00
meisl
af209ad50e + intro SourceCode, tying together source code text with its *origin*; Prog8Parser now only accepts this 2021-07-09 13:24:05 +02:00
meisl
7b89228fa7 + add TODOs re ICompilationTarget 2021-07-09 13:14:02 +02:00
meisl
d31a88206c * importModule(Path): make tests pass (TODO: importLibraryModule with non-existent path) 2021-07-09 13:13:42 +02:00
meisl
cd4ed8765b + add tests for importModule(Path) with invalid path (non-existent or directory) - *failing* 2021-07-09 13:10:42 +02:00
meisl
b6f780d70d * ModuleImporter: make tests pass 2021-07-09 13:02:30 +02:00
meisl
b071a58ca7 + add tests - 4 failing in TestModuleImporter 2021-07-09 12:51:07 +02:00
meisl
ce554f7718 * rename test file 2021-07-09 12:49:55 +02:00
meisl
99b1cec2e1 */+ move ParsingFailedError to Prog8Parser.kt, intro ParseError (soon to replace ParsingFailedError), start testing proper error location info 2021-07-09 12:49:30 +02:00
meisl
46911a8905 + temporarily add PetsciiEncoding (and Petscii.kt copied from compiler) to parser; .linkParents for child nodes of Module 2021-07-09 12:31:46 +02:00
meisl
4eb61529f6 */+ rename prog8Parser (generated java) to Prog8ANTLRParser; add Kotlin class Prog8Parser to interface with it 2021-07-09 12:24:17 +02:00
meisl
81abf29bec
Merge branch 'irmen:v7.1' into v7.1 2021-07-09 11:03:31 +02:00
Irmen de Jong
85897ef8cd launch box16 emulator with the vice monlist file that contains symbols+breakpoints 2021-07-06 22:27:47 +02:00
Irmen de Jong
b824c0b125 kotlin code style setting 2021-07-05 23:41:40 +02:00
Irmen de Jong
6367c6d116 add support for second alternative emulator (box16 in case of cx16 target) 2021-07-05 22:47:51 +02:00
Irmen de Jong
a7736d88a9 got rid of Module.isLibraryModule variable, is now function that derives it from source path 2021-07-04 15:44:25 +02:00
Irmen de Jong
049dbf5a78 improve compiler error when defining duplicate block names 2021-07-04 15:14:39 +02:00
meisl
4ac92caeb5
Update CompilerDevelopment.md 2021-07-03 15:11:34 +02:00
meisl
7af3da2a97
Merge branch 'irmen:v7.1' into v7.1 2021-07-03 15:08:29 +02:00
Irmen de Jong
95a62fcdd1 tidy up todo doc 2021-07-02 21:47:27 +02:00
Irmen de Jong
7872d20554 rename spelling mistake 2021-07-02 20:58:17 +02:00
meisl
a598eb7e98 + add mention of ParseError : ParsingFailedError - particularly for testability this is something that needs to be done 2021-07-02 18:42:38 +02:00
meisl
c786acc39b + CompilerDevelopment.md, outlining what to do to improve testability (atm only for the parsing stage) 2021-07-02 15:41:38 +02:00
meisl
07d8052a57 * fix comments: no more problem with exitProcess 2021-07-02 13:28:19 +02:00
meisl
db9edb477e * less confusing assertion messages (seemingly contradictory in case of failure) 2021-07-02 12:38:24 +02:00
Irmen de Jong
9bd3a6758a improve testability: use error returnvalues instead of using exitProcess() 2021-07-02 00:11:21 +02:00
Irmen de Jong
2cb1560bbd
Merge pull request #49 from meisl/master
A few automatic tests with examples, *of the whole process*...
2021-06-30 23:30:10 +02:00
meisl
006059438f + same warning on the other "TestCompilerXyz" file 2021-06-28 18:49:01 +02:00
meisl
84ea3b9788 + compiler/test/TestCompilerOnExamples.kt: *not actually unit tests - just a kludge!* (but better than nothing) 2021-06-28 18:42:05 +02:00
meisl
b667abde10 + compiler/test/TestCompilerOnCharLit.kt 2021-06-28 18:24:35 +02:00
Irmen de Jong
aa10997171 upgrade to kotlin 1.5.20 2021-06-25 19:38:44 +02:00
Irmen de Jong
7880ac1909 wording and version 2021-06-24 21:34:11 +02:00
Irmen de Jong
f53848b4b9 wording and version 2021-06-24 21:25:35 +02:00
Irmen de Jong
82f2f38680
Merge pull request #48 from meisl/issue40(EOF,EOL)
* fix 47, add tests
2021-06-19 01:55:44 +02:00
meisl
dcc2549574 * fix 47, add tests 2021-06-18 21:55:03 +02:00
Irmen de Jong
cfe4753913
Merge pull request #45 from meisl/issue40(EOF,EOL)
Issue #40, EOF/EOL
2021-06-18 20:22:59 +02:00
meisl
fcb1a7e4d4 * #40: fix grammar rules module and block s.t. we don't need a "synthesized double EOF" (behavior remains exactly the same) 2021-06-14 22:17:30 +02:00
meisl
ce76a7dfa5 * #40: fix grammar wrt line endings - tests pass 2021-06-14 22:04:22 +02:00
meisl
7c1de81861 * #40: fix mixed line endings test, now intentionally failing (!): also test sole \r AND do not allow any recovery, neither from parser not lexer. 2021-06-14 22:02:26 +02:00
meisl
eddad20acc Merge remote-tracking branch 'remotes/origin/master' into issue40(EOF,EOL) 2021-06-13 22:56:24 +02:00
meisl
7daad57862 + #40: test for mixed (Unix/Win/Mac) line endings - *TODO: test doesn't actually fail with old grammar, but a built jar does - WHY?!* 2021-06-13 22:49:54 +02:00
meisl
1468049fe9 + #40: test that (module-level) blocks *before the last* still must have a newline after their closing } 2021-06-13 22:43:27 +02:00
meisl
3b91e59a79 * #40: refactor tests 2021-06-13 20:28:01 +02:00
meisl
3496a30528 * #40: put back in fix for EOL-after-block - tests pass 2021-06-13 20:10:35 +02:00
meisl
32bad5df15 +/* #40: add tests; temporarily undo fix for EOL-after-block so we can see that tests actually fail 2021-06-13 20:08:50 +02:00
Irmen de Jong
3f58eca1be updated gradle scripts (fixed warnings), updated some library dependencies 2021-06-13 18:10:07 +02:00
meisl
2350843d1d Merge remote-tracking branch 'remotes/origin/master' into issue40(EOF,EOL) 2021-06-13 16:06:50 +02:00
Irmen de Jong
a2588a178c added some simple unit tests to the ast parser 2021-06-13 14:59:57 +02:00
meisl
e5292696c4 - #40 grammar: remove obsolete note about line endings 2021-06-13 14:38:25 +02:00