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

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: Rebase. 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
« no previous file with comments | « src/ast/ast.h ('k') | src/ast/ast-expression-rewriter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 947 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 if (stmt->IsJump()) break; 958 if (stmt->IsJump()) break;
959 } 959 }
960 } 960 }
961 961
962 void AstTraversalVisitor::VisitVariableDeclaration(VariableDeclaration* decl) {} 962 void AstTraversalVisitor::VisitVariableDeclaration(VariableDeclaration* decl) {}
963 963
964 void AstTraversalVisitor::VisitFunctionDeclaration(FunctionDeclaration* decl) { 964 void AstTraversalVisitor::VisitFunctionDeclaration(FunctionDeclaration* decl) {
965 RECURSE(Visit(decl->fun())); 965 RECURSE(Visit(decl->fun()));
966 } 966 }
967 967
968 void AstTraversalVisitor::VisitImportDeclaration(ImportDeclaration* decl) {}
969
970 void AstTraversalVisitor::VisitBlock(Block* stmt) { 968 void AstTraversalVisitor::VisitBlock(Block* stmt) {
971 RECURSE(VisitStatements(stmt->statements())); 969 RECURSE(VisitStatements(stmt->statements()));
972 } 970 }
973 971
974 void AstTraversalVisitor::VisitExpressionStatement(ExpressionStatement* stmt) { 972 void AstTraversalVisitor::VisitExpressionStatement(ExpressionStatement* stmt) {
975 RECURSE(Visit(stmt->expression())); 973 RECURSE(Visit(stmt->expression()));
976 } 974 }
977 975
978 void AstTraversalVisitor::VisitEmptyStatement(EmptyStatement* stmt) {} 976 void AstTraversalVisitor::VisitEmptyStatement(EmptyStatement* stmt) {}
979 977
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 bool Literal::Match(void* literal1, void* literal2) { 1234 bool Literal::Match(void* literal1, void* literal2) {
1237 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); 1235 const AstValue* x = static_cast<Literal*>(literal1)->raw_value();
1238 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); 1236 const AstValue* y = static_cast<Literal*>(literal2)->raw_value();
1239 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || 1237 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) ||
1240 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); 1238 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber());
1241 } 1239 }
1242 1240
1243 1241
1244 } // namespace internal 1242 } // namespace internal
1245 } // namespace v8 1243 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast.h ('k') | src/ast/ast-expression-rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698