| 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 // Generated by scripts/tree_gen.py. | 4 // Generated by scripts/tree_gen.py. |
| 5 | 5 |
| 6 ///////////////////////////////////////////////////////////////////////// | 6 ///////////////////////////////////////////////////////////////////////// |
| 7 // CSS specific types: | 7 // CSS specific types: |
| 8 ///////////////////////////////////////////////////////////////////////// | 8 ///////////////////////////////////////////////////////////////////////// |
| 9 | 9 |
| 10 | 10 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 _combinator == TokenKind.COMBINATOR_DESCENDANT; | 119 _combinator == TokenKind.COMBINATOR_DESCENDANT; |
| 120 | 120 |
| 121 String _combinatorToString() => | 121 String _combinatorToString() => |
| 122 isCombinatorDescendant() ? ' ' : | 122 isCombinatorDescendant() ? ' ' : |
| 123 isCombinatorPlus() ? '+' : | 123 isCombinatorPlus() ? '+' : |
| 124 isCombinatorGreater() ? '>' : | 124 isCombinatorGreater() ? '>' : |
| 125 isCombinatorTilde() ? '~' : ''; | 125 isCombinatorTilde() ? '~' : ''; |
| 126 | 126 |
| 127 visit(TreeVisitor visitor) => visitor.visitSimpleSelectorSequence(this); | 127 visit(TreeVisitor visitor) => visitor.visitSimpleSelectorSequence(this); |
| 128 | 128 |
| 129 String toString() => _combinatorToString() + _selector.toString(); | 129 String toString() => "${_combinatorToString()}${_selector.toString()}"; |
| 130 } | 130 } |
| 131 | 131 |
| 132 /* All other selectors (element, #id, .class, attribute, pseudo, negation, | 132 /* All other selectors (element, #id, .class, attribute, pseudo, negation, |
| 133 * namespace, *) are derived from this selector. | 133 * namespace, *) are derived from this selector. |
| 134 */ | 134 */ |
| 135 class SimpleSelector extends ASTNode { | 135 class SimpleSelector extends ASTNode { |
| 136 var _name; | 136 var _name; |
| 137 | 137 |
| 138 SimpleSelector(this._name, SourceSpan span) : super(span); | 138 SimpleSelector(this._name, SourceSpan span) : super(span); |
| 139 | 139 |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 | 329 |
| 330 RuleSet(this._selectorGroup, this._declarationGroup, SourceSpan span) : | 330 RuleSet(this._selectorGroup, this._declarationGroup, SourceSpan span) : |
| 331 super(span); | 331 super(span); |
| 332 | 332 |
| 333 SelectorGroup get selectorGroup => _selectorGroup; | 333 SelectorGroup get selectorGroup => _selectorGroup; |
| 334 DeclarationGroup get declarationGroup => _declarationGroup; | 334 DeclarationGroup get declarationGroup => _declarationGroup; |
| 335 | 335 |
| 336 visit(TreeVisitor visitor) => visitor.visitRuleSet(this); | 336 visit(TreeVisitor visitor) => visitor.visitRuleSet(this); |
| 337 | 337 |
| 338 String toString() => | 338 String toString() => |
| 339 "\n${_selectorGroup.toString()} {\n" + | 339 "\n${_selectorGroup.toString()} {\n" |
| 340 "${_declarationGroup.toString()}}\n"; | 340 "${_declarationGroup.toString()}}\n"; |
| 341 } | 341 } |
| 342 | 342 |
| 343 class Directive extends ASTNode { | 343 class Directive extends ASTNode { |
| 344 Directive(SourceSpan span) : super(span); | 344 Directive(SourceSpan span) : super(span); |
| 345 | 345 |
| 346 String toString() => "Directive"; | 346 String toString() => "Directive"; |
| 347 | 347 |
| 348 bool get isBuiltIn => true; // Known CSS directive? | 348 bool get isBuiltIn => true; // Known CSS directive? |
| 349 bool get isExtension => false; // SCSS extension? | 349 bool get isExtension => false; // SCSS extension? |
| (...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 output.heading('BinaryExpression', node.span); | 1258 output.heading('BinaryExpression', node.span); |
| 1259 // TODO(terry): TBD | 1259 // TODO(terry): TBD |
| 1260 } | 1260 } |
| 1261 | 1261 |
| 1262 void visitUnaryExpression(UnaryExpression node) { | 1262 void visitUnaryExpression(UnaryExpression node) { |
| 1263 output.heading('UnaryExpression', node.span); | 1263 output.heading('UnaryExpression', node.span); |
| 1264 // TODO(terry): TBD | 1264 // TODO(terry): TBD |
| 1265 } | 1265 } |
| 1266 | 1266 |
| 1267 void visitIdentifier(Identifier node) { | 1267 void visitIdentifier(Identifier node) { |
| 1268 output.heading('Identifier(' + output.toValue(node.name) + ")", node.span); | 1268 output.heading('Identifier(${output.toValue(node.name)})', node.span); |
| 1269 } | 1269 } |
| 1270 | 1270 |
| 1271 void visitWildcard(Wildcard node) { | 1271 void visitWildcard(Wildcard node) { |
| 1272 output.heading('Wildcard(*)', node.span); | 1272 output.heading('Wildcard(*)', node.span); |
| 1273 } | 1273 } |
| 1274 | 1274 |
| 1275 // TODO(terry): Defined for frog/tree.dart. | 1275 // TODO(terry): Defined for frog/tree.dart. |
| 1276 void visitTypeReference(TypeReference node) { | 1276 void visitTypeReference(TypeReference node) { |
| 1277 output.heading('Unimplemented'); | 1277 output.heading('Unimplemented'); |
| 1278 } | 1278 } |
| 1279 } | 1279 } |
| OLD | NEW |