Closed stasm closed 7 years ago
@zbraniecki what are you thoughts on the current behavior of the l20n.js parser wrt. the chars allowed in keywords?
umm, not sure what are you asking about. The l20n.js parser handles characters allowed in keywords?
The grammar specifies that all possible characters except a shorthand of special ones like /
, #
etc. are allowed as keywords. However, the following doesn't parse in the l20n.js's parsers (ast and runtime):
foo =
[ą] Ą
I'm asking if you have cycles to fix this in the parser or would you rater have me change the grammar for now and limit keywords to ASCII chars. Allowing more chars in the future will be backwards-compatible.
I think I'd prefer to limit the chars in the spec for now. I'm concerned about non-ascii character being more confusing than helpful at this point.
I removed the additional symbols for allowed characters and also restricted keywords
to ASCII for now. I'd like to go back to being more lax in the future. I also considered using named character classes like [:alpha:]
but they're locale-dependent.
@zbraniecki can you take another look?
@zbraniecki ping
looks great! Sorry for holding you for so long.
Fixes #5. @zbraniecki -- this implements the changes we talked about last week to characters allowed in keywords, including white-space. Note that currently the l20n.js parser doesn't allow non-Latin characters in keywords. Should we update the spec here for now?