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

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

Issue 2845723002: Simplify BodyBuilder's Identifier class. (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | no next file » | 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 88130db360d1a00c43c5b6a9f6b3119ff4e41af2..d6dcba9a20c0813630ae6aedf44c64ff4fae6692 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -1358,7 +1358,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
debugEvent("LiteralSymbol");
String value;
if (identifierCount == 1) {
- value = symbolPartToString(popForValue());
+ value = symbolPartToString(pop());
} else {
List parts = popList(identifierCount);
value = symbolPartToString(parts.first);
@@ -2666,13 +2666,11 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
}
}
-// TODO(ahe): Shouldn't need to be an expression.
-class Identifier extends InvalidExpression {
+class Identifier {
final String name;
+ final int fileOffset;
- Identifier(this.name, int charOffset) {
- fileOffset = charOffset;
- }
+ Identifier(this.name, int charOffset) : fileOffset = charOffset;
Expression get initializer => null;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698