Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Disambiguate ^= without needing [contiguous] #20

Merged
merged 1 commit into from
Sep 4, 2021

Conversation

nicolo-ribaudo
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo commented Sep 4, 2021

^= is a single token whenever / can be parsed as a division token. If / cannot be parsed as a division (and thus starts a regexp), ^= is not a valid token.

^ is always valid, since it can either appear in expression position or in infix position.

This is an alternative fix for #13.

@js-choi
Copy link
Collaborator

js-choi commented Sep 4, 2021

Thank you! See tc39/ecmarkup#356 (comment).

@js-choi
Copy link
Collaborator

js-choi commented Sep 4, 2021

Maybe we should later rename InputElementRegExp and InputElementDiv to something like InputElementExpressionStart and something like InputElementExpressionInfixOperator…though I supposed that would be an editorial change. CC: @bakkot

@js-choi js-choi merged commit 889cbdb into tc39:main Sep 4, 2021
@js-choi js-choi changed the title Disambiguate ^= withuot needing [contiguous] Disambiguate ^= without needing [contiguous] Sep 4, 2021
@nicolo-ribaudo nicolo-ribaudo deleted the remove-contiguous branch September 4, 2021 16:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants