-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
Extend valid set of quoted labels #65
Conversation
Related to #64 This adds `:` to the list of supported characters for Dhall labels and no longer treats the initial character of a quoted label differently
Doesn’t this just move the problem? Now we have an arbitrary list of legal symbols, plus one of them is also used as the separator. I’m not sure what the more general way what be. Escaping? |
The reason I explicitly whitelist allowed characters instead of accepting a broader class of letters is due to the potential for identifier name obfuscation by using visually similar characters. There actually is a Unicode standard with various alternatives for how to implement broader identifier names: http://unicode.org/reports/tr31/ ... but I decided to skip that for now since it increases the complexity of implementing DHall |
Full ack, I’m always for explicit symbol sets. But does it make sense to expand those manually for some use cases? Except if adding Update: Just saw #64, which fixes that problem in a general way. So maybe it’s better to not introduce |
@Profpatsch: Note that this change is only for quoted labels (i.e. surrounded by backticks). That means that a colon is still not allowed in a normal unquoted label:
This also doesn't prevent editors from using a regular expression for matching symbols. The regular expression is:
|
Ah nice, I wasn’t even aware that labels could be quoted with backticks. |
Fixes dhall-lang/dhall-lang#64 As standardized in dhall-lang/dhall-lang#65
Fixes dhall-lang/dhall-lang#64 As standardized in dhall-lang/dhall-lang#65
Related to #64
This adds
:
to the list of supported characters for Dhall labels andno longer treats the initial character of a quoted label differently