Replies: 1 comment 1 reply
-
|
Hey @dhrubomoy,
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently the text mate grammar generated by langium generator has the strings rule's escape hardcoded (I think). In the DSL I am working on strings are escaped differently:
So the string rules should look like following:
{ "patterns": [ { "name": "string.quoted.double.my-dsl", "begin": "\"", "end": "\"", "patterns": [ { "include": "#string-character-escape-double" } ] }, { "name": "string.quoted.single.my-dsl", "begin": "'", "end": "'", "patterns": [ { "include": "#string-character-escape-single" } ] }, { "name": "string.quoted.bracket.my-dsl", "begin": "\\[", "end": "\\]", "patterns": [ { "include": "#string-character-escape-bracket" } ] } ], "repository": { "string-character-escape-double": { "name": "constant.character.escape.my-dsl", "match": "\"\"" }, "string-character-escape-single": { "name": "constant.character.escape.my-dsl", "match": "''" }, "string-character-escape-bracket": { "name": "constant.character.escape.my-dsl", "match": "\\]\\]" } } }It would be great to add the option to define the string rules (may be in the language-config.json), unless there is already a way and I am missing it 😄
Beta Was this translation helpful? Give feedback.
All reactions