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

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

Issue 9121025: cleanup to Value - fix for StringEscapesTest (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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 visit(TreeVisitor visitor) => visitor.visitThisExpression(this); 353 visit(TreeVisitor visitor) => visitor.visitThisExpression(this);
354 } 354 }
355 355
356 class SuperExpression extends Expression { 356 class SuperExpression extends Expression {
357 357
358 SuperExpression(SourceSpan span): super(span) {} 358 SuperExpression(SourceSpan span): super(span) {}
359 359
360 visit(TreeVisitor visitor) => visitor.visitSuperExpression(this); 360 visit(TreeVisitor visitor) => visitor.visitSuperExpression(this);
361 } 361 }
362 362
363 class NullExpression extends Expression { 363 class LiteralExpression extends Expression {
364 Value value;
364 365
365 NullExpression(SourceSpan span): super(span) {} 366 LiteralExpression(this.value, SourceSpan span): super(span) {}
366
367 visit(TreeVisitor visitor) => visitor.visitNullExpression(this);
368 }
369
370 class LiteralExpression extends Expression {
371 var value;
372 TypeReference type;
373 String text;
374
375 LiteralExpression(this.value, this.type, this.text, SourceSpan span): super(sp an) {}
376 367
377 visit(TreeVisitor visitor) => visitor.visitLiteralExpression(this); 368 visit(TreeVisitor visitor) => visitor.visitLiteralExpression(this);
378 } 369 }
379 370
371 class StringInterpExpression extends Expression {
372 List<Expression> pieces;
373
374 StringInterpExpression(this.pieces, SourceSpan span): super(span) {}
375
376 visit(TreeVisitor visitor) => visitor.visitStringInterpExpression(this);
377 }
378
380 class NameTypeReference extends TypeReference { 379 class NameTypeReference extends TypeReference {
381 bool isFinal; 380 bool isFinal;
382 Identifier name; 381 Identifier name;
383 List<Identifier> names; 382 List<Identifier> names;
384 383
385 NameTypeReference(this.isFinal, this.name, this.names, SourceSpan span): super (span) {} 384 NameTypeReference(this.isFinal, this.name, this.names, SourceSpan span): super (span) {}
386 385
387 visit(TreeVisitor visitor) => visitor.visitNameTypeReference(this); 386 visit(TreeVisitor visitor) => visitor.visitNameTypeReference(this);
388 } 387 }
389 388
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 visitAwaitExpression(AwaitExpression node); 555 visitAwaitExpression(AwaitExpression node);
557 556
558 visitDotExpression(DotExpression node); 557 visitDotExpression(DotExpression node);
559 558
560 visitVarExpression(VarExpression node); 559 visitVarExpression(VarExpression node);
561 560
562 visitThisExpression(ThisExpression node); 561 visitThisExpression(ThisExpression node);
563 562
564 visitSuperExpression(SuperExpression node); 563 visitSuperExpression(SuperExpression node);
565 564
566 visitNullExpression(NullExpression node); 565 visitLiteralExpression(LiteralExpression node);
567 566
568 visitLiteralExpression(LiteralExpression node); 567 visitStringInterpExpression(StringInterpExpression node);
569 568
570 visitNameTypeReference(NameTypeReference node); 569 visitNameTypeReference(NameTypeReference node);
571 570
572 visitGenericTypeReference(GenericTypeReference node); 571 visitGenericTypeReference(GenericTypeReference node);
573 572
574 visitFunctionTypeReference(FunctionTypeReference node); 573 visitFunctionTypeReference(FunctionTypeReference node);
575 574
576 visitDefaultTypeReference(DefaultTypeReference node); 575 visitDefaultTypeReference(DefaultTypeReference node);
577 576
578 visitArgumentNode(ArgumentNode node); 577 visitArgumentNode(ArgumentNode node);
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 } 825 }
827 826
828 void visitThisExpression(ThisExpression node) { 827 void visitThisExpression(ThisExpression node) {
829 output.heading('ThisExpression', node.span); 828 output.heading('ThisExpression', node.span);
830 } 829 }
831 830
832 void visitSuperExpression(SuperExpression node) { 831 void visitSuperExpression(SuperExpression node) {
833 output.heading('SuperExpression', node.span); 832 output.heading('SuperExpression', node.span);
834 } 833 }
835 834
836 void visitNullExpression(NullExpression node) { 835 void visitLiteralExpression(LiteralExpression node) {
837 output.heading('NullExpression', node.span); 836 output.heading('LiteralExpression(' + output.toValue(node.value) + ")", node .span);
838 } 837 }
839 838
840 void visitLiteralExpression(LiteralExpression node) { 839 void visitStringInterpExpression(StringInterpExpression node) {
841 output.heading('LiteralExpression', node.span); 840 output.heading('StringInterpExpression', node.span);
842 output.writeValue('value', node.value); 841 output.writeNodeList('pieces', node.pieces);
843 output.writeNode('type', node.type);
844 output.writeValue('text', node.text);
845 } 842 }
846 843
847 void visitNameTypeReference(NameTypeReference node) { 844 void visitNameTypeReference(NameTypeReference node) {
848 output.heading('NameTypeReference', node.span); 845 output.heading('NameTypeReference', node.span);
849 output.writeValue('isFinal', node.isFinal); 846 output.writeValue('isFinal', node.isFinal);
850 output.writeNode('name', node.name); 847 output.writeNode('name', node.name);
851 output.writeNodeList('names', node.names); 848 output.writeNodeList('names', node.names);
852 } 849 }
853 850
854 void visitGenericTypeReference(GenericTypeReference node) { 851 void visitGenericTypeReference(GenericTypeReference node) {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 output.heading('DeclaredIdentifier', node.span); 911 output.heading('DeclaredIdentifier', node.span);
915 output.writeNode('type', node.type); 912 output.writeNode('type', node.type);
916 output.writeNode('name', node.name); 913 output.writeNode('name', node.name);
917 } 914 }
918 915
919 void visitTypeReference(TypeReference node) { 916 void visitTypeReference(TypeReference node) {
920 output.heading('TypeReference(' + output.toValue(node.type) + ")", node.span ); 917 output.heading('TypeReference(' + output.toValue(node.type) + ")", node.span );
921 } 918 }
922 919
923 } 920 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698