You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several languages, including Python, JavaScript, and Rust, define their identifier syntax using new Unicode properties (ID_Start, ID_Continue, XID_Start, and XID_Continue). Ideally, these languages' Sublime syntax definitions should refer to those Unicode properties to ensure correctness. Emulating those properties manually is not easy and is likely to be a source of syntax bugs. My JavaScript PR is not truly comprehensive, because it does not consider the properties Other_ID_Start, Pattern_Syntax, or Pattern_White_Space.
Sublime currently uses Oniguruma 6.9.1, which does implement these properties. However, Sublime's custom regexp engine does not implement them. As a result, syntax rules that use these properties trigger the Oniguruma engine. For something as central as parsing identifiers, this would likely cause an unacceptable performance regression.
The text was updated successfully, but these errors were encountered:
Reopening this issue because, as I've discovered, Sublime's internal engine does not support these properties. Using them in a regexp triggers the Oniguruma engine. For something as central as parsing identifiers, this would probably be an unacceptable performance regression for most syntaxes.
Now that Sublime's Oniguruma version implements these properties, I hope that it may make sense to add them to the internal engine.
Several languages, including Python, JavaScript, and Rust, define their identifier syntax using new Unicode properties (
ID_Start
,ID_Continue
,XID_Start
, andXID_Continue
). Ideally, these languages' Sublime syntax definitions should refer to those Unicode properties to ensure correctness. Emulating those properties manually is not easy and is likely to be a source of syntax bugs. My JavaScript PR is not truly comprehensive, because it does not consider the propertiesOther_ID_Start
,Pattern_Syntax
, orPattern_White_Space
.Sublime currently uses Oniguruma 6.9.1, which does implement these properties. However, Sublime's custom regexp engine does not implement them. As a result, syntax rules that use these properties trigger the Oniguruma engine. For something as central as parsing identifiers, this would likely cause an unacceptable performance regression.
The text was updated successfully, but these errors were encountered: