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

Side by Side Diff: frog/tree.g.dart

Issue 9270048: Lots of frog cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 months 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
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 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 } 370 }
371 371
372 class StringInterpExpression extends Expression { 372 class StringInterpExpression extends Expression {
373 List<Expression> pieces; 373 List<Expression> pieces;
374 374
375 StringInterpExpression(this.pieces, SourceSpan span): super(span) {} 375 StringInterpExpression(this.pieces, SourceSpan span): super(span) {}
376 376
377 visit(TreeVisitor visitor) => visitor.visitStringInterpExpression(this); 377 visit(TreeVisitor visitor) => visitor.visitStringInterpExpression(this);
378 } 378 }
379 379
380 class SimpleTypeReference extends TypeReference {
381 Type type;
382
383 SimpleTypeReference(this.type, SourceSpan span): super(span) {}
384
385 visit(TreeVisitor visitor) => visitor.visitSimpleTypeReference(this);
386 }
387
380 class NameTypeReference extends TypeReference { 388 class NameTypeReference extends TypeReference {
381 bool isFinal; 389 bool isFinal;
382 Identifier name; 390 Identifier name;
383 List<Identifier> names; 391 List<Identifier> names;
384 392
385 NameTypeReference(this.isFinal, this.name, this.names, SourceSpan span): super (span) {} 393 NameTypeReference(this.isFinal, this.name, this.names, SourceSpan span): super (span) {}
386 394
387 visit(TreeVisitor visitor) => visitor.visitNameTypeReference(this); 395 visit(TreeVisitor visitor) => visitor.visitNameTypeReference(this);
388 } 396 }
389 397
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 visitVarExpression(VarExpression node); 568 visitVarExpression(VarExpression node);
561 569
562 visitThisExpression(ThisExpression node); 570 visitThisExpression(ThisExpression node);
563 571
564 visitSuperExpression(SuperExpression node); 572 visitSuperExpression(SuperExpression node);
565 573
566 visitLiteralExpression(LiteralExpression node); 574 visitLiteralExpression(LiteralExpression node);
567 575
568 visitStringInterpExpression(StringInterpExpression node); 576 visitStringInterpExpression(StringInterpExpression node);
569 577
578 visitSimpleTypeReference(SimpleTypeReference node);
579
570 visitNameTypeReference(NameTypeReference node); 580 visitNameTypeReference(NameTypeReference node);
571 581
572 visitGenericTypeReference(GenericTypeReference node); 582 visitGenericTypeReference(GenericTypeReference node);
573 583
574 visitFunctionTypeReference(FunctionTypeReference node); 584 visitFunctionTypeReference(FunctionTypeReference node);
575 585
576 visitDefaultTypeReference(DefaultTypeReference node); 586 visitDefaultTypeReference(DefaultTypeReference node);
577 587
578 visitArgumentNode(ArgumentNode node); 588 visitArgumentNode(ArgumentNode node);
579 589
580 visitFormalNode(FormalNode node); 590 visitFormalNode(FormalNode node);
581 591
582 visitCatchNode(CatchNode node); 592 visitCatchNode(CatchNode node);
583 593
584 visitCaseNode(CaseNode node); 594 visitCaseNode(CaseNode node);
585 595
586 visitTypeParameter(TypeParameter node); 596 visitTypeParameter(TypeParameter node);
587 597
588 visitIdentifier(Identifier node); 598 visitIdentifier(Identifier node);
589 599
590 visitDeclaredIdentifier(DeclaredIdentifier node); 600 visitDeclaredIdentifier(DeclaredIdentifier node);
591 601
592 visitTypeReference(TypeReference node);
593
594 } 602 }
595 603
596 class TreePrinter implements TreeVisitor { 604 class TreePrinter implements TreeVisitor {
597 var output; 605 var output;
598 TreePrinter(this.output) { output.printer = this; } 606 TreePrinter(this.output) { output.printer = this; }
599 void visitDirectiveDefinition(DirectiveDefinition node) { 607 void visitDirectiveDefinition(DirectiveDefinition node) {
600 output.heading('DirectiveDefinition', node.span); 608 output.heading('DirectiveDefinition', node.span);
601 output.writeNode('name', node.name); 609 output.writeNode('name', node.name);
602 output.writeNodeList('arguments', node.arguments); 610 output.writeNodeList('arguments', node.arguments);
603 } 611 }
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 844
837 void visitLiteralExpression(LiteralExpression node) { 845 void visitLiteralExpression(LiteralExpression node) {
838 output.heading('LiteralExpression(' + output.toValue(node.value) + ")", node .span); 846 output.heading('LiteralExpression(' + output.toValue(node.value) + ")", node .span);
839 } 847 }
840 848
841 void visitStringInterpExpression(StringInterpExpression node) { 849 void visitStringInterpExpression(StringInterpExpression node) {
842 output.heading('StringInterpExpression', node.span); 850 output.heading('StringInterpExpression', node.span);
843 output.writeNodeList('pieces', node.pieces); 851 output.writeNodeList('pieces', node.pieces);
844 } 852 }
845 853
854 void visitSimpleTypeReference(SimpleTypeReference node) {
855 output.heading('SimpleTypeReference(' + output.toValue(node.type) + ")", nod e.span);
856 }
857
846 void visitNameTypeReference(NameTypeReference node) { 858 void visitNameTypeReference(NameTypeReference node) {
847 output.heading('NameTypeReference', node.span); 859 output.heading('NameTypeReference', node.span);
848 output.writeValue('isFinal', node.isFinal); 860 output.writeValue('isFinal', node.isFinal);
849 output.writeNode('name', node.name); 861 output.writeNode('name', node.name);
850 output.writeNodeList('names', node.names); 862 output.writeNodeList('names', node.names);
851 } 863 }
852 864
853 void visitGenericTypeReference(GenericTypeReference node) { 865 void visitGenericTypeReference(GenericTypeReference node) {
854 output.heading('GenericTypeReference', node.span); 866 output.heading('GenericTypeReference', node.span);
855 output.writeNode('baseType', node.baseType); 867 output.writeNode('baseType', node.baseType);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 void visitIdentifier(Identifier node) { 920 void visitIdentifier(Identifier node) {
909 output.heading('Identifier(' + output.toValue(node.name) + ")", node.span); 921 output.heading('Identifier(' + output.toValue(node.name) + ")", node.span);
910 } 922 }
911 923
912 void visitDeclaredIdentifier(DeclaredIdentifier node) { 924 void visitDeclaredIdentifier(DeclaredIdentifier node) {
913 output.heading('DeclaredIdentifier', node.span); 925 output.heading('DeclaredIdentifier', node.span);
914 output.writeNode('type', node.type); 926 output.writeNode('type', node.type);
915 output.writeNode('name', node.name); 927 output.writeNode('name', node.name);
916 } 928 }
917 929
918 void visitTypeReference(TypeReference node) {
919 output.heading('TypeReference(' + output.toValue(node.type) + ")", node.span );
920 }
921
922 } 930 }
OLDNEW
« frog/gen.dart ('K') | « frog/tree.dart ('k') | frog/type.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698