Skip to content

Fix AE identifiers: reserved word $#73

Closed
blake-regalia wants to merge 1 commit into
masterfrom
fix-aei-cash
Closed

Fix AE identifiers: reserved word $#73
blake-regalia wants to merge 1 commit into
masterfrom
fix-aei-cash

Conversation

@blake-regalia
Copy link
Copy Markdown
Collaborator

@blake-regalia blake-regalia commented Aug 15, 2019

Fixes #72.

@bathos Not sure if this is the best way to solve this but it seems to do the trick.

@blake-regalia blake-regalia requested a review from bathos August 15, 2019 22:54
@blake-regalia blake-regalia changed the title Fixes #72 Fix AE Identifier $ Aug 15, 2019
@blake-regalia blake-regalia changed the title Fix AE Identifier $ Fix AE identifiers: reserved word $ Aug 15, 2019
@bathos
Copy link
Copy Markdown
Owner

bathos commented Aug 15, 2019

Since $ is probably the only likely case to trip this, this solution may be sufficient. However I think the underlying issue is that the negative lookahead should be for the identifierPart var, because this should also be scoped as an identifier:

image

What’s used elsewhere, and what I think was intended to be used in these cases too, is {{idEnd}}. I think that would fix both:

idEnd: '(?=[^\$_‍‍{{ID_Continue}}]|$)'

...though I wonder if that’s really supposed to be '(?=[^\\$_‍‍{{ID_Continue}}]|$)'

@bathos
Copy link
Copy Markdown
Owner

bathos commented Dec 25, 2019

This should now be fixed in depth by 90a9649. Sublime/Oniguruma are now more up to date and support the ID_Start/IDS and ID_Continue/IDC properties directly. There were several old mistakes related to handling id ends where end/part/continue were mixed up which was the main issue and it’s all a bit simpler now.

@bathos bathos closed this Dec 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AE identifiers prefixed with reserved words followed by $

2 participants