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

Side by Side Diff: src/ast/ast.cc

Issue 2108193003: [modules] AST and parser rework. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@anonymous-declarations
Patch Set: . Created 4 years, 5 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/ast/ast.h" 5 #include "src/ast/ast.h"
6 6
7 #include <cmath> // For isfinite. 7 #include <cmath> // For isfinite.
8 8
9 #include "src/ast/prettyprinter.h" 9 #include "src/ast/prettyprinter.h"
10 #include "src/ast/scopes.h" 10 #include "src/ast/scopes.h"
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 if (stmt->IsJump()) break; 849 if (stmt->IsJump()) break;
850 } 850 }
851 } 851 }
852 852
853 void AstTraversalVisitor::VisitVariableDeclaration(VariableDeclaration* decl) {} 853 void AstTraversalVisitor::VisitVariableDeclaration(VariableDeclaration* decl) {}
854 854
855 void AstTraversalVisitor::VisitFunctionDeclaration(FunctionDeclaration* decl) { 855 void AstTraversalVisitor::VisitFunctionDeclaration(FunctionDeclaration* decl) {
856 RECURSE(Visit(decl->fun())); 856 RECURSE(Visit(decl->fun()));
857 } 857 }
858 858
859 void AstTraversalVisitor::VisitImportDeclaration(ImportDeclaration* decl) {}
860
861 void AstTraversalVisitor::VisitBlock(Block* stmt) { 859 void AstTraversalVisitor::VisitBlock(Block* stmt) {
862 RECURSE(VisitStatements(stmt->statements())); 860 RECURSE(VisitStatements(stmt->statements()));
863 } 861 }
864 862
865 void AstTraversalVisitor::VisitExpressionStatement(ExpressionStatement* stmt) { 863 void AstTraversalVisitor::VisitExpressionStatement(ExpressionStatement* stmt) {
866 RECURSE(Visit(stmt->expression())); 864 RECURSE(Visit(stmt->expression()));
867 } 865 }
868 866
869 void AstTraversalVisitor::VisitEmptyStatement(EmptyStatement* stmt) {} 867 void AstTraversalVisitor::VisitEmptyStatement(EmptyStatement* stmt) {}
870 868
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1127 bool Literal::Match(void* literal1, void* literal2) { 1125 bool Literal::Match(void* literal1, void* literal2) {
1128 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); 1126 const AstValue* x = static_cast<Literal*>(literal1)->raw_value();
1129 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); 1127 const AstValue* y = static_cast<Literal*>(literal2)->raw_value();
1130 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || 1128 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) ||
1131 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); 1129 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber());
1132 } 1130 }
1133 1131
1134 1132
1135 } // namespace internal 1133 } // namespace internal
1136 } // namespace v8 1134 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast.h ('k') | src/ast/ast-expression-rewriter.cc » ('j') | src/ast/modules.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698