| 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 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 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1473 | 1473 |
| 1474 final Token beginToken; | 1474 final Token beginToken; |
| 1475 final Token endToken; | 1475 final Token endToken; |
| 1476 | 1476 |
| 1477 ScriptTag(this.tag, this.argument, this.prefixIdentifier, this.prefix, | 1477 ScriptTag(this.tag, this.argument, this.prefixIdentifier, this.prefix, |
| 1478 this.beginToken, this.endToken); | 1478 this.beginToken, this.endToken); |
| 1479 | 1479 |
| 1480 bool isImport() => tag.source == const SourceString("import"); | 1480 bool isImport() => tag.source == const SourceString("import"); |
| 1481 bool isSource() => tag.source == const SourceString("source"); | 1481 bool isSource() => tag.source == const SourceString("source"); |
| 1482 bool isLibrary() => tag.source == const SourceString("library"); | 1482 bool isLibrary() => tag.source == const SourceString("library"); |
| 1483 bool isResource() => tag.source == const SourceString("resource"); |
| 1483 | 1484 |
| 1484 ScriptTag asScriptTag() => this; | 1485 ScriptTag asScriptTag() => this; |
| 1485 | 1486 |
| 1486 accept(Visitor visitor) => visitor.visitScriptTag(this); | 1487 accept(Visitor visitor) => visitor.visitScriptTag(this); |
| 1487 | 1488 |
| 1488 visitChildren(Visitor visitor) { | 1489 visitChildren(Visitor visitor) { |
| 1489 tag.accept(visitor); | 1490 tag.accept(visitor); |
| 1490 argument.accept(visitor); | 1491 argument.accept(visitor); |
| 1491 if (prefixIdentifier !== null) prefixIdentifier.accept(visitor); | 1492 if (prefixIdentifier !== null) prefixIdentifier.accept(visitor); |
| 1492 if (prefix !== null) prefix.accept(visitor); | 1493 if (prefix !== null) prefix.accept(visitor); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1621 DartString visitLiteralString(LiteralString node) => node.dartString; | 1622 DartString visitLiteralString(LiteralString node) => node.dartString; |
| 1622 } | 1623 } |
| 1623 | 1624 |
| 1624 class IsInterpolationVisitor extends AbstractVisitor<bool> { | 1625 class IsInterpolationVisitor extends AbstractVisitor<bool> { |
| 1625 const IsInterpolationVisitor(); | 1626 const IsInterpolationVisitor(); |
| 1626 bool visitNode(Node node) => false; | 1627 bool visitNode(Node node) => false; |
| 1627 bool visitStringInterpolation(StringInterpolation node) => true; | 1628 bool visitStringInterpolation(StringInterpolation node) => true; |
| 1628 bool visitStringJuxtaposition(StringJuxtaposition node) | 1629 bool visitStringJuxtaposition(StringJuxtaposition node) |
| 1629 => node.isInterpolation; | 1630 => node.isInterpolation; |
| 1630 } | 1631 } |
| OLD | NEW |