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

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

Issue 2768523002: Fix IdentifierContext for primary expressions. Also pass IdentifierContext to handleThisExpression … (Closed)
Patch Set: Created 3 years, 9 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
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 21e00f59580a008ed96a87404c6527c78fbffda0..ef270ba87bc2ad0b7f0794ef46ed6cb8ebc97ef0 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -820,8 +820,8 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
List<Expression> expressions = <Expression>[];
// Contains more than just \' or \".
if (first.lexeme.length > 1) {
- expressions
- .add(new StringLiteral(unescapeFirstStringPart(first.lexeme, quote)));
+ expressions.add(
+ new StringLiteral(unescapeFirstStringPart(first.lexeme, quote)));
}
for (int i = 1; i < parts.length - 1; i++) {
var part = parts[i];
@@ -836,7 +836,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
// Contains more than just \' or \".
if (last.lexeme.length > 1) {
expressions
- .add(new StringLiteral(unescapeLastStringPart(last.lexeme, quote)));
+ .add(new StringLiteral(unescapeLastStringPart(last.lexeme, quote)));
}
push(new StringConcatenation(expressions)
..fileOffset = endToken.charOffset);
@@ -1634,7 +1634,6 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
bool checkArguments(FunctionNode function, Arguments arguments,
List<TypeParameter> typeParameters) {
-
if (arguments.positional.length < function.requiredParameterCount ||
arguments.positional.length > function.positionalParameters.length) {
return false;
@@ -1731,7 +1730,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
}
@override
- void handleThisExpression(Token token) {
+ void handleThisExpression(Token token, IdentifierContext context) {
debugEvent("ThisExpression");
if (isFirstIdentifier && isInstanceContext) {
push(new ThisAccessor(this, token.charOffset, inInitializer));
@@ -1742,7 +1741,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
}
@override
- void handleSuperExpression(Token token) {
+ void handleSuperExpression(Token token, IdentifierContext context) {
debugEvent("SuperExpression");
if (isFirstIdentifier && isInstanceContext) {
Member member = this.member.target;
@@ -2395,8 +2394,7 @@ abstract class ContextAccessor extends BuilderAccessor {
String get plainNameForRead => internalError("Unsupported operation.");
Expression doInvocation(int charOffset, Arguments arguments) {
- print("$uri:$charOffset: Internal error: Unhandled: ${runtimeType}");
- return internalError("Unhandled: ${runtimeType}");
+ return internalError("Unhandled: ${runtimeType}", uri, charOffset);
}
Expression buildSimpleRead();
« no previous file with comments | « pkg/compiler/lib/src/parser/node_listener.dart ('k') | pkg/front_end/lib/src/fasta/parser/identifier_context.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698