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 class Identifier extends ASTNode { | 10 class Identifier extends ASTNode { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 TemplateChildren(this.children, SourceSpan span): super(span); | 85 TemplateChildren(this.children, SourceSpan span): super(span); |
86 TemplateChildren.empty(SourceSpan span): children = [], super(span); | 86 TemplateChildren.empty(SourceSpan span): children = [], super(span); |
87 | 87 |
88 add(var child) { | 88 add(var child) { |
89 if (children == null) { | 89 if (children == null) { |
90 children = new List<ASTNode>(); | 90 children = new List<ASTNode>(); |
91 } | 91 } |
92 children.add(child); | 92 children.add(child); |
93 } | 93 } |
94 | 94 |
95 ASTNode last() => children.last(); | 95 ASTNode get last => children.last; |
96 ASTNode removeLast() => children.removeLast(); | 96 ASTNode removeLast() => children.removeLast(); |
97 bool get anyChildren => children != null && children.length > 0; | 97 bool get anyChildren => children != null && children.length > 0; |
98 | 98 |
99 visit(TreeVisitor visitor) => visitor.visitTemplateChildren(this); | 99 visit(TreeVisitor visitor) => visitor.visitTemplateChildren(this); |
100 | 100 |
101 String toString() { | 101 String toString() { |
102 StringBuffer buff = new StringBuffer(); | 102 StringBuffer buff = new StringBuffer(); |
103 if (children != null) { | 103 if (children != null) { |
104 for (final child in children) { | 104 for (final child in children) { |
105 buff.add(child.toString()); | 105 buff.add(child.toString()); |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 output.writeValue('params', node.params); | 416 output.writeValue('params', node.params); |
417 } | 417 } |
418 | 418 |
419 void visitTemplateGetter(TemplateGetter node) { | 419 void visitTemplateGetter(TemplateGetter node) { |
420 output.heading('template getter', node.span); | 420 output.heading('template getter', node.span); |
421 output.writeValue('getter Signature', node.getterSignatureAsString()); | 421 output.writeValue('getter Signature', node.getterSignatureAsString()); |
422 visitTemplateDocument(node.docFrag); | 422 visitTemplateDocument(node.docFrag); |
423 } | 423 } |
424 } | 424 } |
425 | 425 |
OLD | NEW |