- Notifications
You must be signed in to change notification settings - Fork1.1k
Fix #15514 in Parser#15524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Fix #15514 in Parser#15524
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a missing set of parentheses in parser which caused a lookaheadfrom INTERPOLATIONID, which should be illegal, since the lookahead thenmigth set the next TokenData which is subsequently overwritten by reset.We now demand that lookahead cannot be called if the current token isa INTERPOLATIONID.There were two many variants `lookahead` in the Scanner, which only differeredin camelCase or not. Rename one to`peekAhead` to make the code clearer.
Uh oh!
There was an error while loading.Please reload this page.
odersky commentedJun 25, 2022
This was really hard to diagnose. I was stumped until I looked more closely at@som-snytt's first PR#15518, which pointed at the problem. |
som-snytt commentedJun 27, 2022
Lgtm. I looked at that line a couple of times. I'm on the phone app for the first time and not sure I will see how to approve. I tried not to think about parser during our visit to Grove of Titans redwoods. |
odersky commentedJun 27, 2022
@som-snytt Thanks! I am going to merge now. |
Uh oh!
There was an error while loading.Please reload this page.
There was a missing set of parentheses in parser which caused a lookahead
from INTERPOLATIONID, which should be illegal, since the lookahead then
might set the next TokenData which is subsequently overwritten by reset.
We now demand that lookahead cannot be called if the current token is
a INTERPOLATIONID.
There were two variants of
lookaheadin the Scanner, which only differedin camelCase or not. Rename one to
peekAheadto make the code clearer.Alternative for#15518 and#15519.