Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 interface Visitor<R> { | 5 interface Visitor<R> { |
| 6 R visitBlock(Block node); | 6 R visitBlock(Block node); |
| 7 R visitBreakStatement(BreakStatement node); | 7 R visitBreakStatement(BreakStatement node); |
| 8 R visitCatchBlock(CatchBlock node); | 8 R visitCatchBlock(CatchBlock node); |
| 9 R visitClassNode(ClassNode node); | 9 R visitClassNode(ClassNode node); |
| 10 R visitConditional(Conditional node); | 10 R visitConditional(Conditional node); |
| (...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1265 | 1265 |
| 1266 Token getEndToken() => semicolonToken; | 1266 Token getEndToken() => semicolonToken; |
| 1267 } | 1267 } |
| 1268 | 1268 |
| 1269 class LiteralMap extends Expression { | 1269 class LiteralMap extends Expression { |
| 1270 final NodeList typeArguments; | 1270 final NodeList typeArguments; |
| 1271 final NodeList entries; | 1271 final NodeList entries; |
| 1272 | 1272 |
| 1273 LiteralMap(this.typeArguments, this.entries); | 1273 LiteralMap(this.typeArguments, this.entries); |
| 1274 | 1274 |
| 1275 bool isConst() => false; // TODO(ahe): Store constness. | |
|
ngeoffray
2012/03/01 08:36:09
Where is this used?
ahe
2012/03/06 15:34:12
When I create the list of key/value pairs.
| |
| 1276 | |
| 1275 LiteralMap asLiteralMap() => this; | 1277 LiteralMap asLiteralMap() => this; |
| 1276 | 1278 |
| 1277 accept(Visitor visitor) => visitor.visitLiteralMap(this); | 1279 accept(Visitor visitor) => visitor.visitLiteralMap(this); |
| 1278 | 1280 |
| 1279 visitChildren(Visitor visitor) { | 1281 visitChildren(Visitor visitor) { |
| 1280 if (typeArguments != null) typeArguments.accept(visitor); | 1282 if (typeArguments != null) typeArguments.accept(visitor); |
| 1281 entries.accept(visitor); | 1283 entries.accept(visitor); |
| 1282 } | 1284 } |
| 1283 | 1285 |
| 1284 Token getBeginToken() => firstBeginToken(typeArguments, entries); | 1286 Token getBeginToken() => firstBeginToken(typeArguments, entries); |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1573 static bool isConstructorRedirect(Send node) { | 1575 static bool isConstructorRedirect(Send node) { |
| 1574 return (node.receiver === null && | 1576 return (node.receiver === null && |
| 1575 node.selector.asIdentifier() !== null && | 1577 node.selector.asIdentifier() !== null && |
| 1576 node.selector.asIdentifier().isThis()) || | 1578 node.selector.asIdentifier().isThis()) || |
| 1577 (node.receiver !== null && | 1579 (node.receiver !== null && |
| 1578 node.receiver.asIdentifier() !== null && | 1580 node.receiver.asIdentifier() !== null && |
| 1579 node.receiver.asIdentifier().isThis() && | 1581 node.receiver.asIdentifier().isThis() && |
| 1580 node.selector.asIdentifier() !== null); | 1582 node.selector.asIdentifier() !== null); |
| 1581 } | 1583 } |
| 1582 } | 1584 } |
| OLD | NEW |