Skip to content

Wrong highlighting of a block in splice #57

@jiribenes

Description

@jiribenes

The following program:

import stream
import stringbuffer

def main() =
  println("test: ${collectString { ['h', 'e', 'l', 'l', 'o'].each }}")

highlights wrongly:
Image

I think the rough idea is to count braces inside of the splice -- maybe allow these as a separate top-level pattern that has higher priority than string interpolation, then everything might just work out ®.

Here's the relevant code:

"stringTemplates": {
"begin": "\\$\\{",
"beginCaptures": {
"0": { "name": "punctuation.definition.template-expression.begin.effekt" }
},
"end": "\\}",
"endCaptures": {
"0": { "name": "punctuation.definition.template-expression.end.effekt" }
},
"name": "meta.embedded.line.effekt",
"patterns": [
{ "include": "$self" }
]
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions