Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
odersky merged 2 commits intoscala:mainfromdotty-staging:fix-15514-in-parser
Jun 27, 2022
Merged

Conversation

@odersky
Copy link
Contributor

@oderskyodersky commentedJun 25, 2022
edited
Loading

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 oflookahead in the Scanner, which only differed
in camelCase or not. Rename one topeekAhead to make the code clearer.

Alternative for#15518 and#15519.

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.
@odersky
Copy link
ContributorAuthor

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
Copy link
Contributor

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
Copy link
ContributorAuthor

@som-snytt Thanks! I am going to merge now.

@oderskyodersky merged commit16ded76 intoscala:mainJun 27, 2022
@oderskyodersky deleted the fix-15514-in-parser branchJune 27, 2022 08:39
@KordyjanKordyjan added this to the3.2.1 milestoneAug 1, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@som-snyttsom-snyttAwaiting requested review from som-snytt

Assignees

@som-snyttsom-snytt

Labels

None yet

Projects

None yet

Milestone

3.2.1

Development

Successfully merging this pull request may close these issues.

String interpolation followed by a dot is missing string literals

3 participants

@odersky@som-snytt@Kordyjan

[8]ページ先頭

©2009-2025 Movatter.jp