One of our uses of Groovy is the execution of Spock tests. Spock is a test framework, which makes extensive use of labels to mark the sections of a test. Example:
class Test {
def "test add"() {
when:
def a = 10
def b = 10
def result = a + b
then:
result == 20
}
}
Labels are kind of "inherited" from Java. With the current parser, they seem to be missing/broken.
Highlighting for the example in my neovim (Note the broken def highlighting in the line right after the first label):
In bigger files, the highlighting is all over the place.
I tried to locate label parsing in your grammar.js and could not find it, but admittedly, I am not a treesitter expert. Can you verify that labels are simply missing? If they are missing, I might give their implementation a try.
One of our uses of Groovy is the execution of Spock tests. Spock is a test framework, which makes extensive use of labels to mark the sections of a test. Example:
Labels are kind of "inherited" from Java. With the current parser, they seem to be missing/broken. Highlighting for the example in my neovim (Note the broken
def
highlighting in the line right after the first label):In bigger files, the highlighting is all over the place.
I tried to locate label parsing in your grammar.js and could not find it, but admittedly, I am not a treesitter expert. Can you verify that labels are simply missing? If they are missing, I might give their implementation a try.