Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: utils/template/htmltree.dart

Issue 11273041: Make first and last getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with co19 issue number. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « utils/template/codegen.dart ('k') | utils/template/parser.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « utils/template/codegen.dart ('k') | utils/template/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698