bathos/Ecmascript-Sublime

Deleted

Opened this issue · 6 comments

Nothing to see here 😄

ZWNJ and ZWJ are actually included in the pattern used for identifier continuation chars. This may be a sublime limitation?

Nothing to see here 😄

Ah, it’s not the joiner — it’s the roman numeral. (The rules you pointed to btw are for ES5 — they changed in ES2015, mostly expanding, but there are some IDs which became invalid, too.)

The roman numerals though do appear in ID_Continue and this is a bug. Unfortunately we aren’t able to reference derived character property classes in Sublime Syntax, so we have to piece them together from the base properties, and this membership is not fixed — it changes with each Unicode update.

I’m going to put this one on the back burner because it’s both super fringe (though I appreciate what you’re doing!) and would best be served by a more significant update that builds the syntax programmatically, something I’ve considered for a long time that would make it more manageable and would address things like this really nicely (since we can just generate the patterns from current Unicode tables).

(In general, though, I’m gonna point out that there are some things you might turn up which would be wontfix imo, because there are definitely some odd-but-valid things we could theoretically match but which would require so much extra code that it would cause performance and maintenance issues. In practice, you can’t really parse JS with regex alone perfectly, especially when it’s impossible to match look ahead across linebreaks, so even though this package aims for precision, there are tradeoffs that can’t be avoided).

wat