Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

feat(parseOperator & parseQuantifier): '{' is parsed as Operator and … #189

Merged
merged 2 commits into from Mar 27, 2020
Merged

feat(parseOperator & parseQuantifier): '{' is parsed as Operator and … #189

merged 2 commits into from Mar 27, 2020

Conversation

ghost
Copy link

@ghost ghost commented Mar 21, 2020

…parseQuantifier correctly advances

This updates parseOperator and parseQuantifier to correctly handle {n} and {n,n} quantifiers.
parseQuantifier needs to advance to next token for the two edge cases where it finds its closing '}' token.
Otherwise, the parser would've erroneously re-create a character token for that '}' that is really just a part of the quantifier.
For the case where a {n} or {n,n} quantifier is missing a target, diagnostics will read 'Nothing to repeat'.

…parseQuantifier correctly advances

This updates parseOperator and parseQuantifier to correctly handle {n} and {n,n} quantifiers.
parseQuantifier needs to advance to next token for the two edge cases where it finds its closing '}' token.
Otherwise, the parser will re-create a character token for that '}' that is really just a part of the quantifier.
@ghost ghost mentioned this pull request Mar 21, 2020
@ghost ghost mentioned this pull request Mar 27, 2020
23 tasks
@sebmck sebmck merged commit 0897c01 into rome:master Mar 27, 2020
@sebmck
Copy link
Contributor

sebmck commented Mar 27, 2020

Thank you so much! Sorry for the delay in merging. If you run into any other problems feel free to join our Discord.

@ghost
Copy link
Author

ghost commented Mar 27, 2020

No problem, hoping to pick up another item soon!

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.

3 participants