Conversation
|
|
||
| plugins { | ||
| id "org.jetbrains.intellij" version "0.4.2" | ||
| id "org.jetbrains.intellij" version "1.1.3" |
There was a problem hiding this comment.
Had to go along with the gradle upgrade.
|
|
||
| wrapper { | ||
| gradleVersion = '5.2.1' | ||
| gradleVersion = '7.1.1' |
There was a problem hiding this comment.
Picked the latest so that it will hopefully keep working for the coming years.
|
|
||
| generateGrammarSource { | ||
| arguments += ["-package", "org.antlr.jetbrains.sample.parser", "-Xexact-output-dir"] | ||
| } No newline at end of file |
There was a problem hiding this comment.
Odd stuff. Replaced with a single package header in the grammar (not perfect either) and now the files are generated in the correct package with the correct package statement.
There was a problem hiding this comment.
I think there's a downside to this method, but I can't remember what it is 🤔 .
There was a problem hiding this comment.
The upside is that you can open the generated files in an IDE and not get compile errors :-)
I'm happy to revert it though, just say the word.
| */ | ||
| script | ||
| : vardef* function* statement* EOF | ||
| : (vardef|function|statement)* EOF |
There was a problem hiding this comment.
This makes a lot more sense and fixes a few tests.
| public class TestXPath extends ParsingTestCase { | ||
|
|
||
| public static final String TEST_SAMPLE = "src/test/java/org/antlr/jetbrains/adaptor/test/test.sample"; | ||
| public static final String BUBBLESORT_SAMPLE = "src/test/java/org/antlr/jetbrains/adaptor/test/bubblesort.sample"; |
There was a problem hiding this comment.
The testfiles couldn't be found, the paths were all wrong.
| String code = "var x = 1"; | ||
| String output = code; | ||
| String xpath = "/script/statement"; | ||
| String xpath = "/script"; |
There was a problem hiding this comment.
vardefs are not under statement (anymore?)
|
Heh, cool. Could you also sign the contributors.txt file? thanks! |
| func g(x:int, y:float) { } | ||
|
|
||
| func h() : boolean { return false; } | ||
| func h() : boolean { return false } |
There was a problem hiding this comment.
The comma isn't allowed there (or is this an implicit test for invalid syntax?)
|
Okay, signed it! |
|
I will have to wait for @bjansen to have time to review this as I've been out of the loop for too long. Sorry! |
|
@bjansen, do you have time to review this RP? |
I thought I'd check this out and run it, but gradle immediately gave a cryptic error message. Googling suggested I upgrade Gradle, so I did. After fixing things here and there I found out that the tests were broken. The grammar and the tests do not match, so I fixed things in the grammar and in the tests. The plugin can now be built, tested, and run again.