OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef V8_AST_AST_TRAVERSAL_VISITOR_H_ | 5 #ifndef V8_AST_AST_TRAVERSAL_VISITOR_H_ |
6 #define V8_AST_AST_TRAVERSAL_VISITOR_H_ | 6 #define V8_AST_AST_TRAVERSAL_VISITOR_H_ |
7 | 7 |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 | 10 |
(...skipping 268 matching lines...) Loading... |
279 template <class Subclass> | 279 template <class Subclass> |
280 void AstTraversalVisitor<Subclass>::VisitDebuggerStatement( | 280 void AstTraversalVisitor<Subclass>::VisitDebuggerStatement( |
281 DebuggerStatement* stmt) { | 281 DebuggerStatement* stmt) { |
282 PROCESS_NODE(stmt); | 282 PROCESS_NODE(stmt); |
283 } | 283 } |
284 | 284 |
285 template <class Subclass> | 285 template <class Subclass> |
286 void AstTraversalVisitor<Subclass>::VisitFunctionLiteral( | 286 void AstTraversalVisitor<Subclass>::VisitFunctionLiteral( |
287 FunctionLiteral* expr) { | 287 FunctionLiteral* expr) { |
288 PROCESS_EXPRESSION(expr); | 288 PROCESS_EXPRESSION(expr); |
289 Scope* scope = expr->scope(); | 289 DeclarationScope* scope = expr->scope(); |
290 RECURSE_EXPRESSION(VisitDeclarations(scope->declarations())); | 290 RECURSE_EXPRESSION(VisitDeclarations(scope->declarations())); |
291 RECURSE_EXPRESSION(VisitStatements(expr->body())); | 291 RECURSE_EXPRESSION(VisitStatements(expr->body())); |
292 } | 292 } |
293 | 293 |
294 template <class Subclass> | 294 template <class Subclass> |
295 void AstTraversalVisitor<Subclass>::VisitNativeFunctionLiteral( | 295 void AstTraversalVisitor<Subclass>::VisitNativeFunctionLiteral( |
296 NativeFunctionLiteral* expr) { | 296 NativeFunctionLiteral* expr) { |
297 PROCESS_EXPRESSION(expr); | 297 PROCESS_EXPRESSION(expr); |
298 } | 298 } |
299 | 299 |
(...skipping 195 matching lines...) Loading... |
495 | 495 |
496 #undef PROCESS_NODE | 496 #undef PROCESS_NODE |
497 #undef PROCESS_EXPRESSION | 497 #undef PROCESS_EXPRESSION |
498 #undef RECURSE_EXPRESSION | 498 #undef RECURSE_EXPRESSION |
499 #undef RECURSE | 499 #undef RECURSE |
500 | 500 |
501 } // namespace internal | 501 } // namespace internal |
502 } // namespace v8 | 502 } // namespace v8 |
503 | 503 |
504 #endif // V8_AST_AST_TRAVERSAL_VISITOR_H_ | 504 #endif // V8_AST_AST_TRAVERSAL_VISITOR_H_ |
OLD | NEW |