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 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1435 | 1435 |
| 1436 visitChildren(Visitor visitor) { | 1436 visitChildren(Visitor visitor) { |
| 1437 formals.accept(visitor); | 1437 formals.accept(visitor); |
| 1438 block.accept(visitor); | 1438 block.accept(visitor); |
| 1439 } | 1439 } |
| 1440 | 1440 |
| 1441 Token getBeginToken() => catchKeyword; | 1441 Token getBeginToken() => catchKeyword; |
| 1442 | 1442 |
| 1443 Token getEndToken() => block.getEndToken(); | 1443 Token getEndToken() => block.getEndToken(); |
| 1444 } | 1444 } |
| 1445 | |
| 1446 class Initializers { | |
| 1447 | |
| 1448 static bool isSuperConstructorCall(Send node) { | |
| 1449 return (node.receiver === null && | |
| 1450 node.selector.asIdentifier() !== null && | |
| 1451 node.selector.asIdentifier().isSuper()) || | |
| 1452 (node.receiver !== null && | |
| 1453 node.receiver.asIdentifier() !== null && | |
| 1454 node.receiver.asIdentifier().isSuper() && | |
| 1455 node.selector.asIdentifier() !== null); | |
| 1456 } | |
| 1457 | |
| 1458 static bool isConstructorRedirect(Send node) { | |
| 1459 return (node.receiver === null && | |
| 1460 node.selector.asIdentifier() !== null && | |
| 1461 node.selector.asIdentifier().isThis()) || | |
| 1462 (node.receiver !== null && | |
| 1463 node.receiver.asIdentifier() !== null && | |
| 1464 node.receiver.asIdentifier().isThis() && | |
| 1465 node.selector.asIdentifier() !== null); | |
| 1466 } | |
|
ngeoffray
2012/02/07 14:25:59
extra space.
karlklose
2012/02/08 14:12:00
Done.
| |
| 1467 | |
| 1468 } | |
| OLD | NEW |