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 class DirectiveDefinition extends Definition { | 6 class DirectiveDefinition extends Definition { |
7 Identifier name; | 7 Identifier name; |
8 List<ArgumentNode> arguments; | 8 List<ArgumentNode> arguments; |
9 | 9 |
10 DirectiveDefinition(this.name, this.arguments, SourceSpan span): super(span) {
} | 10 DirectiveDefinition(this.name, this.arguments, SourceSpan span): super(span) {
} |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 String name; | 478 String name; |
479 | 479 |
480 Identifier(this.name, SourceSpan span): super(span) {} | 480 Identifier(this.name, SourceSpan span): super(span) {} |
481 | 481 |
482 visit(TreeVisitor visitor) => visitor.visitIdentifier(this); | 482 visit(TreeVisitor visitor) => visitor.visitIdentifier(this); |
483 } | 483 } |
484 | 484 |
485 class DeclaredIdentifier extends Expression { | 485 class DeclaredIdentifier extends Expression { |
486 TypeReference type; | 486 TypeReference type; |
487 Identifier name; | 487 Identifier name; |
| 488 bool isFinal; |
488 | 489 |
489 DeclaredIdentifier(this.type, this.name, SourceSpan span): super(span) {} | 490 DeclaredIdentifier(this.type, this.name, this.isFinal, SourceSpan span): super
(span) {} |
490 | 491 |
491 visit(TreeVisitor visitor) => visitor.visitDeclaredIdentifier(this); | 492 visit(TreeVisitor visitor) => visitor.visitDeclaredIdentifier(this); |
492 } | 493 } |
493 | 494 |
494 | 495 |
495 interface TreeVisitor { | 496 interface TreeVisitor { |
496 visitDirectiveDefinition(DirectiveDefinition node); | 497 visitDirectiveDefinition(DirectiveDefinition node); |
497 | 498 |
498 visitTypeDefinition(TypeDefinition node); | 499 visitTypeDefinition(TypeDefinition node); |
499 | 500 |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
918 } | 919 } |
919 | 920 |
920 void visitIdentifier(Identifier node) { | 921 void visitIdentifier(Identifier node) { |
921 output.heading('Identifier(' + output.toValue(node.name) + ")", node.span); | 922 output.heading('Identifier(' + output.toValue(node.name) + ")", node.span); |
922 } | 923 } |
923 | 924 |
924 void visitDeclaredIdentifier(DeclaredIdentifier node) { | 925 void visitDeclaredIdentifier(DeclaredIdentifier node) { |
925 output.heading('DeclaredIdentifier', node.span); | 926 output.heading('DeclaredIdentifier', node.span); |
926 output.writeNode('type', node.type); | 927 output.writeNode('type', node.type); |
927 output.writeNode('name', node.name); | 928 output.writeNode('name', node.name); |
| 929 output.writeValue('isFinal', node.isFinal); |
928 } | 930 } |
929 | 931 |
930 } | 932 } |
OLD | NEW |