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

Unified Diff: pkg/compiler/lib/src/tree/unparser.dart

Issue 2744463003: update fasta scanner to always generate INDEX or INDEX_EQ tokens (Closed)
Patch Set: merge 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
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/parser/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/tree/unparser.dart
diff --git a/pkg/compiler/lib/src/tree/unparser.dart b/pkg/compiler/lib/src/tree/unparser.dart
index e75d7bc78f348ee0d8e2153d369345f43aa87d18..65101ec1dc0f2ca0783941165974ce1d1daebbc5 100644
--- a/pkg/compiler/lib/src/tree/unparser.dart
+++ b/pkg/compiler/lib/src/tree/unparser.dart
@@ -386,7 +386,10 @@ class Unparser extends Indentation implements Visitor {
if (node.nodes != null) {
unparseNodeListFrom(node, node.nodes, spaces: spaces);
}
- if (node.endToken != null) write(node.endToken.lexeme);
+ // if "[]" then beginToken == endToken ... only write beginToken
+ if (node.endToken != null && node.endToken != node.beginToken) {
+ write(node.endToken.lexeme);
+ }
}
visitNodeList(NodeList node) {
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/parser/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698