-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve syntax highlighting #18
Conversation
227b692
to
9c2b2d3
Compare
syntaxes/effekt.tmLanguage.json
Outdated
"characters": { | ||
"name": "string.quoted.single.effekt", | ||
"begin": "'", | ||
"end": "'", | ||
"patterns": [{ | ||
"name": "constant.character.escape.effekt", | ||
"match": "\\\\((u[0-9a-fA-F]{4})|.)" | ||
}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hereby reject the way character escapes are actually parsed, so the grammar is exactly what you would expect (moreover, we're somewhat lax in comparison with the actual lexer in order to allow more characters in a char literal, which is -- I think -- a good thing for highlighting)
syntaxes/effekt.tmLanguage.json
Outdated
"match": "\\\\u[0-9A-Fa-f]{4}", | ||
"name": "string.quoted.single.char.effekt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was quite surprised, but \uFF0F
is really a char literal with no need for single quotes in the current parser!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed effekt-lang/effekt#521 just to be sure that we don't have to support this :)
0885ced
to
dc5fc7f
Compare
I've updated the screenshots with some of the newer features, but I'm running out of things to add, so feel free to review and merge :) |
Changes
in
is now a conditional keyword (rendered as a keyword only invar x in r = ...
)=>
and then not parsing the rest of the argumentsat
correctlymodule
s andimport
s correctlyregion
Caveats / open questions
'\uA0EB'
char literals as opposed to\uA0EB
detected in the parser, see issue Escapes are broken effekt#521Future work
?
and!
(I tried, but I couldn't get it to work)box {<capabilities>*} { ... }
syntaxScreenshots (before [left] vs after [right])