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 tree; | 5 part of tree; |
| 6 | 6 |
| 7 abstract class Visitor<R> { | 7 abstract class Visitor<R> { |
| 8 const Visitor(); | 8 const Visitor(); |
| 9 | 9 |
| 10 R visitNode(Node node); | 10 R visitNode(Node node); |
| (...skipping 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1794 /** | 1794 /** |
| 1795 * An [:import:] library tag. | 1795 * An [:import:] library tag. |
| 1796 * | 1796 * |
| 1797 * An import tag is dependency on another library where the exported identifiers | 1797 * An import tag is dependency on another library where the exported identifiers |
| 1798 * are put into the import scope of the importing library. The import scope is | 1798 * are put into the import scope of the importing library. The import scope is |
| 1799 * only visible inside the library. | 1799 * only visible inside the library. |
| 1800 */ | 1800 */ |
| 1801 class Import extends LibraryDependency { | 1801 class Import extends LibraryDependency { |
| 1802 final Identifier prefix; | 1802 final Identifier prefix; |
| 1803 final Token importKeyword; | 1803 final Token importKeyword; |
| 1804 final bool isDeferred; | |
| 1804 | 1805 |
| 1805 Import(this.importKeyword, StringNode uri, | 1806 Import(this.importKeyword, StringNode uri, |
| 1806 this.prefix, NodeList combinators, | 1807 this.prefix, NodeList combinators, |
| 1807 Link<MetadataAnnotation> metadata) | 1808 Link<MetadataAnnotation> metadata, |
| 1809 {this.isDeferred}) | |
|
Johnni Winther
2014/03/18 12:29:14
You need to update the Unparser and the PrettyPrin
sigurdm
2014/03/19 12:46:30
Done.
| |
| 1808 : super(uri, combinators, metadata); | 1810 : super(uri, combinators, metadata); |
| 1809 | 1811 |
| 1810 bool get isImport => true; | 1812 bool get isImport => true; |
| 1811 | 1813 |
| 1812 Import asImport() => this; | 1814 Import asImport() => this; |
| 1813 | 1815 |
| 1814 Token get asKeyword => prefix == null ? null : uri.getEndToken().next; | 1816 Token get asKeyword => prefix == null ? null : uri.getEndToken().next; |
| 1815 | 1817 |
| 1816 accept(Visitor visitor) => visitor.visitImport(this); | 1818 accept(Visitor visitor) => visitor.visitImport(this); |
| 1817 | 1819 |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2107 } | 2109 } |
| 2108 | 2110 |
| 2109 class IsInterpolationVisitor extends Visitor<bool> { | 2111 class IsInterpolationVisitor extends Visitor<bool> { |
| 2110 const IsInterpolationVisitor(); | 2112 const IsInterpolationVisitor(); |
| 2111 bool visitNode(Node node) => false; | 2113 bool visitNode(Node node) => false; |
| 2112 bool visitStringInterpolation(StringInterpolation node) => true; | 2114 bool visitStringInterpolation(StringInterpolation node) => true; |
| 2113 bool visitStringJuxtaposition(StringJuxtaposition node) | 2115 bool visitStringJuxtaposition(StringJuxtaposition node) |
| 2114 => node.isInterpolation; | 2116 => node.isInterpolation; |
| 2115 } | 2117 } |
| 2116 | 2118 |
| OLD | NEW |