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
Add built-in rules for Unicode ID_Start and ID_Continue #180
Comments
One more note: it seems that ID_Start is a subset of (Ltmou | Nl), and doesn't include |
According to http://unicode.org/reports/tr31/#Specific_Character_Adjustments, |
One more thing I stumbled upon yesterday, is that |
Re:
...where Table 3 contains exactly
What confuses me about Python and Rust is that they do both allow leading underscores in variable names...yet claim that identStart is just XID_Start. Oh well. Anyways, now that I feel like I understand this...I agree with what you said, that our |
Re: But now that I think about it, maybe it's better to not include a built-in Thoughts? |
Well, we could put in an |
Yes, that would work. However, I'd lean towards not doing it that way because we can't really provide a sensible default, and basically every grammar would need to override This would mean that you'd need to understand rule overriding to make almost any useful grammar, which is not the case right now. (Hmmm, though I suppose to support comments you do need to extend the |
I agree. My vote would be to not have a built-in |
Currently, there is no default. Everyone has to implement an identifier rule on his/her own. |
While I agree that a built-in
but "for some reason" I can't parse IMO the small amount of additional work that goes into writing your own |
It would be nice to have some built-in rules for identifiers, so that we have a sensible default for people building new languages in Ohm. For reference, I took a look at a few different languages to see if any of them use the Unicode ID_Start/ID_Continue. Here are the results:
Not sure this makes things any clearer, but I thought it would be good to have a few data points.
The text was updated successfully, but these errors were encountered: