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

Unified Diff: dart/lib/compiler/implementation/tree/nodes.dart

Issue 10880026: Record literal list type arguments and report errors when there are too many. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Updated dart2dart status Created 8 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
Index: dart/lib/compiler/implementation/tree/nodes.dart
diff --git a/dart/lib/compiler/implementation/tree/nodes.dart b/dart/lib/compiler/implementation/tree/nodes.dart
index 014c86a4f659e47f0447971178786ed1a2ba63a5..ba05232ec1449caa83f933401b39cbcd3d7289d4 100644
--- a/dart/lib/compiler/implementation/tree/nodes.dart
+++ b/dart/lib/compiler/implementation/tree/nodes.dart
@@ -817,12 +817,12 @@ class LiteralNull extends Literal<SourceString> {
}
class LiteralList extends Expression {
- final TypeAnnotation type;
+ final NodeList typeArguments;
final NodeList elements;
final Token constKeyword;
- LiteralList(this.type, this.elements, this.constKeyword);
+ LiteralList(this.typeArguments, this.elements, this.constKeyword);
bool isConst() => constKeyword !== null;
@@ -830,13 +830,13 @@ class LiteralList extends Expression {
accept(Visitor visitor) => visitor.visitLiteralList(this);
visitChildren(Visitor visitor) {
- if (type !== null) type.accept(visitor);
+ if (typeArguments !== null) typeArguments.accept(visitor);
elements.accept(visitor);
}
Token getBeginToken() {
if (constKeyword !== null) return constKeyword;
- return firstBeginToken(type, elements);
+ return firstBeginToken(typeArguments, elements);
}
Token getEndToken() => elements.getEndToken();
« no previous file with comments | « dart/lib/compiler/implementation/scanner/listener.dart ('k') | dart/lib/compiler/implementation/tree/unparser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698