Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of js_ast; | 5 part of js_ast; |
| 6 | 6 |
| 7 abstract class NodeVisitor<T> { | 7 abstract class NodeVisitor<T> { |
| 8 T visitProgram(Program node); | 8 T visitProgram(Program node); |
| 9 | 9 |
| 10 T visitBlock(Block node); | 10 T visitBlock(Block node); |
| (...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1127 | 1127 |
| 1128 void visitChildren(NodeVisitor visitor) {} | 1128 void visitChildren(NodeVisitor visitor) {} |
| 1129 | 1129 |
| 1130 ArrayHole _clone() => new ArrayHole(); | 1130 ArrayHole _clone() => new ArrayHole(); |
| 1131 | 1131 |
| 1132 int get precedenceLevel => PRIMARY; | 1132 int get precedenceLevel => PRIMARY; |
| 1133 } | 1133 } |
| 1134 | 1134 |
| 1135 class ObjectInitializer extends Expression { | 1135 class ObjectInitializer extends Expression { |
| 1136 final List<Property> properties; | 1136 final List<Property> properties; |
| 1137 final bool vertical; | |
|
Jennifer Messerly
2015/05/19 18:19:01
This could be computed:
bool _vertical;
bool get
Leaf
2015/05/19 22:31:13
Done.
| |
| 1137 | 1138 |
| 1138 /** | 1139 /** |
| 1139 * Constructs a new object-initializer containing the given [properties]. | 1140 * Constructs a new object-initializer containing the given [properties]. |
| 1140 */ | 1141 */ |
| 1141 ObjectInitializer(this.properties); | 1142 ObjectInitializer(this.properties, {this.vertical: false}); |
| 1142 | 1143 |
| 1143 accept(NodeVisitor visitor) => visitor.visitObjectInitializer(this); | 1144 accept(NodeVisitor visitor) => visitor.visitObjectInitializer(this); |
| 1144 | 1145 |
| 1145 void visitChildren(NodeVisitor visitor) { | 1146 void visitChildren(NodeVisitor visitor) { |
| 1146 for (Property init in properties) init.accept(visitor); | 1147 for (Property init in properties) init.accept(visitor); |
| 1147 } | 1148 } |
| 1148 | 1149 |
| 1149 ObjectInitializer _clone() => new ObjectInitializer(properties); | 1150 ObjectInitializer _clone() => new ObjectInitializer(properties); |
| 1150 | 1151 |
| 1151 int get precedenceLevel => PRIMARY; | 1152 int get precedenceLevel => PRIMARY; |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1440 final Expression expression; | 1441 final Expression expression; |
| 1441 | 1442 |
| 1442 CommentExpression(this.comment, this.expression); | 1443 CommentExpression(this.comment, this.expression); |
| 1443 | 1444 |
| 1444 int get precedenceLevel => PRIMARY; | 1445 int get precedenceLevel => PRIMARY; |
| 1445 accept(NodeVisitor visitor) => visitor.visitCommentExpression(this); | 1446 accept(NodeVisitor visitor) => visitor.visitCommentExpression(this); |
| 1446 CommentExpression _clone() => new CommentExpression(comment, expression); | 1447 CommentExpression _clone() => new CommentExpression(comment, expression); |
| 1447 | 1448 |
| 1448 void visitChildren(NodeVisitor visitor) => expression.accept(visitor); | 1449 void visitChildren(NodeVisitor visitor) => expression.accept(visitor); |
| 1449 } | 1450 } |
| OLD | NEW |