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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/body_builder.dart

Issue 2978073002: Add closeBraceTokenFor and use it instead of BeginToken. (Closed)
Patch Set: Created 3 years, 5 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/compiler/lib/src/parser/element_listener.dart ('k') | pkg/front_end/lib/src/fasta/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/kernel/body_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index 2669e45b1a62274c175b15584adc4f48af9643c2..720ed79084120164a6a5bff99955b66967bcdef7 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -15,8 +15,6 @@ import 'package:kernel/core_types.dart' show CoreTypes;
import 'package:kernel/transformations/flags.dart' show TransformerFlag;
-import '../../scanner/token.dart' show BeginToken, Token;
-
import '../fasta_codes.dart' as fasta;
import '../fasta_codes.dart' show LocatedMessage, Message;
@@ -28,7 +26,13 @@ import '../modifier.dart' show Modifier, constMask, finalMask;
import '../parser/native_support.dart' show skipNativeClause;
import '../parser.dart'
- show Assert, FormalParameterKind, IdentifierContext, MemberKind, optional;
+ show
+ Assert,
+ FormalParameterKind,
+ IdentifierContext,
+ MemberKind,
+ closeBraceTokenFor,
+ optional;
import '../parser/formal_parameter_kind.dart'
show isOptionalPositionalFormalParameterKind;
@@ -45,6 +49,8 @@ import '../quote.dart'
unescapeLastStringPart,
unescapeString;
+import '../scanner.dart' show Token;
+
import '../scanner/token.dart' show isBinaryOperator, isMinusOperator;
import '../scope.dart' show ProblemBuilder;
@@ -741,9 +747,10 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
}
@override
- void handleParenthesizedExpression(BeginToken token) {
+ void handleParenthesizedExpression(Token token) {
debugEvent("ParenthesizedExpression");
- push(new ParenthesizedExpression(this, popForValue(), token.endGroup));
+ push(new ParenthesizedExpression(
+ this, popForValue(), closeBraceTokenFor(token)));
}
@override
« no previous file with comments | « pkg/compiler/lib/src/parser/element_listener.dart ('k') | pkg/front_end/lib/src/fasta/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698