Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: pkg/front_end/lib/src/fasta/parser/parser.dart

Issue 3003863002: [kernel] Position on switch expression (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/listener.dart ('k') | pkg/kernel/binary.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/parser/parser.dart
diff --git a/pkg/front_end/lib/src/fasta/parser/parser.dart b/pkg/front_end/lib/src/fasta/parser/parser.dart
index d3bcceae05a50ab1bdd7ec486e4fa479814c7fa3..9b29f6b74f74f8af4798adb3ad9c5b67ba8b0c08 100644
--- a/pkg/front_end/lib/src/fasta/parser/parser.dart
+++ b/pkg/front_end/lib/src/fasta/parser/parser.dart
@@ -3886,12 +3886,12 @@ class Parser {
Token switchKeyword = token;
listener.beginSwitchStatement(switchKeyword);
token = parseParenthesizedExpression(token.next);
- token = parseSwitchBlock(token);
+ token = parseSwitchBlock(token, switchKeyword);
listener.endSwitchStatement(switchKeyword, token);
return token.next;
}
- Token parseSwitchBlock(Token token) {
+ Token parseSwitchBlock(Token token, Token switchKeyword) {
ahe 2017/08/25 10:04:31 This token is already passed to endSwitchStatement
Token begin = token;
listener.beginSwitchBlock(begin);
token = expect('{', token);
@@ -3903,7 +3903,7 @@ class Parser {
token = parseSwitchCase(token);
++caseCount;
}
- listener.endSwitchBlock(caseCount, begin, token);
+ listener.endSwitchBlock(caseCount, begin, token, switchKeyword);
expect('}', token);
return token;
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/listener.dart ('k') | pkg/kernel/binary.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698