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) {
} |
11 | 11 |
12 visit(TreeVisitor visitor) => visitor.visitDirectiveDefinition(this); | 12 visit(TreeVisitor visitor) => visitor.visitDirectiveDefinition(this); |
13 } | 13 } |
14 | 14 |
15 class TypeDefinition extends Definition { | 15 class TypeDefinition extends Definition { |
16 bool isClass; | 16 bool isClass; |
17 Identifier name; | 17 Identifier name; |
18 List<TypeParameter> typeParameters; | 18 List<ParameterType> typeParameters; |
19 List<TypeReference> extendsTypes; | 19 List<TypeReference> extendsTypes; |
20 List<TypeReference> implementsTypes; | 20 List<TypeReference> implementsTypes; |
21 NativeType nativeType; | 21 NativeType nativeType; |
22 TypeReference factoryType; | 22 TypeReference factoryType; |
23 List<Statement> body; | 23 List<Statement> body; |
24 | 24 |
25 TypeDefinition(this.isClass, this.name, this.typeParameters, this.extendsTypes
, this.implementsTypes, this.nativeType, this.factoryType, this.body, SourceSpan
span): super(span) {} | 25 TypeDefinition(this.isClass, this.name, this.typeParameters, this.extendsTypes
, this.implementsTypes, this.nativeType, this.factoryType, this.body, SourceSpan
span): super(span) {} |
26 | 26 |
27 visit(TreeVisitor visitor) => visitor.visitTypeDefinition(this); | 27 visit(TreeVisitor visitor) => visitor.visitTypeDefinition(this); |
28 } | 28 } |
29 | 29 |
30 class FunctionTypeDefinition extends Definition { | 30 class FunctionTypeDefinition extends Definition { |
31 FunctionDefinition func; | 31 FunctionDefinition func; |
32 List<TypeParameter> typeParameters; | 32 List<ParameterType> typeParameters; |
33 | 33 |
34 FunctionTypeDefinition(this.func, this.typeParameters, SourceSpan span): super
(span) {} | 34 FunctionTypeDefinition(this.func, this.typeParameters, SourceSpan span): super
(span) {} |
35 | 35 |
36 visit(TreeVisitor visitor) => visitor.visitFunctionTypeDefinition(this); | 36 visit(TreeVisitor visitor) => visitor.visitFunctionTypeDefinition(this); |
37 } | 37 } |
38 | 38 |
39 class VariableDefinition extends Definition { | 39 class VariableDefinition extends Definition { |
40 List<Token> modifiers; | 40 List<Token> modifiers; |
41 TypeReference type; | 41 TypeReference type; |
42 List<Identifier> names; | 42 List<Identifier> names; |
43 List<Expression> values; | 43 List<Expression> values; |
44 | 44 |
45 VariableDefinition(this.modifiers, this.type, this.names, this.values, SourceS
pan span): super(span) {} | 45 VariableDefinition(this.modifiers, this.type, this.names, this.values, SourceS
pan span): super(span) {} |
46 | 46 |
47 visit(TreeVisitor visitor) => visitor.visitVariableDefinition(this); | 47 visit(TreeVisitor visitor) => visitor.visitVariableDefinition(this); |
48 } | 48 } |
49 | 49 |
50 class FunctionDefinition extends Definition { | 50 class FunctionDefinition extends Definition { |
51 List<Token> modifiers; | 51 List<Token> modifiers; |
52 TypeReference returnType; | 52 TypeReference returnType; |
53 Identifier name; | 53 Identifier name; |
54 List<FormalNode> formals; | 54 List<FormalNode> formals; |
| 55 List<ParameterType> typeParameters; |
55 List<Expression> initializers; | 56 List<Expression> initializers; |
56 Statement body; | 57 Statement body; |
57 | 58 |
58 FunctionDefinition(this.modifiers, this.returnType, this.name, this.formals, t
his.initializers, this.body, SourceSpan span): super(span) {} | 59 FunctionDefinition(this.modifiers, this.returnType, this.name, this.formals, t
his.typeParameters, this.initializers, this.body, SourceSpan span): super(span)
{} |
59 | 60 |
60 visit(TreeVisitor visitor) => visitor.visitFunctionDefinition(this); | 61 visit(TreeVisitor visitor) => visitor.visitFunctionDefinition(this); |
61 } | 62 } |
62 | 63 |
63 class ReturnStatement extends Statement { | 64 class ReturnStatement extends Statement { |
64 Expression value; | 65 Expression value; |
65 | 66 |
66 ReturnStatement(this.value, SourceSpan span): super(span) {} | 67 ReturnStatement(this.value, SourceSpan span): super(span) {} |
67 | 68 |
68 visit(TreeVisitor visitor) => visitor.visitReturnStatement(this); | 69 visit(TreeVisitor visitor) => visitor.visitReturnStatement(this); |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 output.writeNodeList('names', node.names); | 615 output.writeNodeList('names', node.names); |
615 output.writeNodeList('values', node.values); | 616 output.writeNodeList('values', node.values); |
616 } | 617 } |
617 | 618 |
618 void visitFunctionDefinition(FunctionDefinition node) { | 619 void visitFunctionDefinition(FunctionDefinition node) { |
619 output.heading('FunctionDefinition', node.span); | 620 output.heading('FunctionDefinition', node.span); |
620 output.writeList('modifiers', node.modifiers); | 621 output.writeList('modifiers', node.modifiers); |
621 output.writeNode('returnType', node.returnType); | 622 output.writeNode('returnType', node.returnType); |
622 output.writeNode('name', node.name); | 623 output.writeNode('name', node.name); |
623 output.writeNodeList('formals', node.formals); | 624 output.writeNodeList('formals', node.formals); |
| 625 output.writeList('typeParameters', node.typeParameters); |
624 output.writeNodeList('initializers', node.initializers); | 626 output.writeNodeList('initializers', node.initializers); |
625 output.writeNode('body', node.body); | 627 output.writeNode('body', node.body); |
626 } | 628 } |
627 | 629 |
628 void visitReturnStatement(ReturnStatement node) { | 630 void visitReturnStatement(ReturnStatement node) { |
629 output.heading('ReturnStatement', node.span); | 631 output.heading('ReturnStatement', node.span); |
630 output.writeNode('value', node.value); | 632 output.writeNode('value', node.value); |
631 } | 633 } |
632 | 634 |
633 void visitThrowStatement(ThrowStatement node) { | 635 void visitThrowStatement(ThrowStatement node) { |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
892 output.heading('DeclaredIdentifier', node.span); | 894 output.heading('DeclaredIdentifier', node.span); |
893 output.writeNode('type', node.type); | 895 output.writeNode('type', node.type); |
894 output.writeNode('name', node.name); | 896 output.writeNode('name', node.name); |
895 } | 897 } |
896 | 898 |
897 void visitTypeReference(TypeReference node) { | 899 void visitTypeReference(TypeReference node) { |
898 output.heading('TypeReference(' + output.toValue(node.type) + ")", node.span
); | 900 output.heading('TypeReference(' + output.toValue(node.type) + ")", node.span
); |
899 } | 901 } |
900 | 902 |
901 } | 903 } |
OLD | NEW |