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

Side by Side Diff: src/prettyprinter.cc

Issue 9401008: Parsing of basic module declarations (no imports/exports yet). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Lasse's comments. Created 8 years, 10 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 Print(";"); 77 Print(";");
78 } 78 }
79 79
80 80
81 void PrettyPrinter::VisitModuleLiteral(ModuleLiteral* node) { 81 void PrettyPrinter::VisitModuleLiteral(ModuleLiteral* node) {
82 VisitBlock(node->body()); 82 VisitBlock(node->body());
83 } 83 }
84 84
85 85
86 void PrettyPrinter::VisitModuleVariable(ModuleVariable* node) { 86 void PrettyPrinter::VisitModuleVariable(ModuleVariable* node) {
87 PrintLiteral(node->var()->name(), false); 87 Visit(node->proxy());
88 } 88 }
89 89
90 90
91 void PrettyPrinter::VisitModulePath(ModulePath* node) { 91 void PrettyPrinter::VisitModulePath(ModulePath* node) {
92 Visit(node->module()); 92 Visit(node->module());
93 Print("."); 93 Print(".");
94 PrintLiteral(node->name(), false); 94 PrintLiteral(node->name(), false);
95 } 95 }
96 96
97 97
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 Visit(node->module()); 766 Visit(node->module());
767 } 767 }
768 768
769 769
770 void AstPrinter::VisitModuleLiteral(ModuleLiteral* node) { 770 void AstPrinter::VisitModuleLiteral(ModuleLiteral* node) {
771 VisitBlock(node->body()); 771 VisitBlock(node->body());
772 } 772 }
773 773
774 774
775 void AstPrinter::VisitModuleVariable(ModuleVariable* node) { 775 void AstPrinter::VisitModuleVariable(ModuleVariable* node) {
776 PrintLiteralIndented("VARIABLE", node->var()->name(), false); 776 Visit(node->proxy());
777 } 777 }
778 778
779 779
780 void AstPrinter::VisitModulePath(ModulePath* node) { 780 void AstPrinter::VisitModulePath(ModulePath* node) {
781 IndentedScope indent(this, "PATH"); 781 IndentedScope indent(this, "PATH");
782 PrintIndentedVisit("MODULE", node->module()); 782 PrintIndentedVisit("MODULE", node->module());
783 PrintLiteralIndented("NAME", node->name(), false); 783 PrintLiteralIndented("NAME", node->name(), false);
784 } 784 }
785 785
786 786
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 } 1075 }
1076 1076
1077 1077
1078 void AstPrinter::VisitThisFunction(ThisFunction* node) { 1078 void AstPrinter::VisitThisFunction(ThisFunction* node) {
1079 IndentedScope indent(this, "THIS-FUNCTION"); 1079 IndentedScope indent(this, "THIS-FUNCTION");
1080 } 1080 }
1081 1081
1082 #endif // DEBUG 1082 #endif // DEBUG
1083 1083
1084 } } // namespace v8::internal 1084 } } // namespace v8::internal
OLDNEW
« src/parser.cc ('K') | « src/parser.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698