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-expression-visitor.h

Issue 2169833002: [parser] Refactor AstTraversalVisitor (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 4 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.cc ('k') | src/ast/ast-expression-visitor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef V8_AST_AST_EXPRESSION_VISITOR_H_
6 #define V8_AST_AST_EXPRESSION_VISITOR_H_
7
8 #include "src/allocation.h"
9 #include "src/ast/ast.h"
10 #include "src/ast/scopes.h"
11 #include "src/type-info.h"
12 #include "src/zone.h"
13
14 namespace v8 {
15 namespace internal {
16
17 // A Visitor over a CompilationInfo's AST that invokes
18 // VisitExpression on each expression node.
19
20 class AstExpressionVisitor : public AstTraversalVisitor {
21 public:
22 AstExpressionVisitor(Isolate* isolate, Expression* root);
23 AstExpressionVisitor(uintptr_t stack_limit, Expression* root);
24 void Run();
25
26 protected:
27 virtual void VisitExpression(Expression* expression) = 0;
28
29 private:
30 #define DECLARE_VISIT(type) void Visit##type(type* node) override;
31 EXPRESSION_NODE_LIST(DECLARE_VISIT)
32 #undef DECLARE_VISIT
33
34 Expression* root_;
35
36 DISALLOW_COPY_AND_ASSIGN(AstExpressionVisitor);
37 };
38 } // namespace internal
39 } // namespace v8
40
41 #endif // V8_AST_AST_EXPRESSION_VISITOR_H_
OLDNEW
« no previous file with comments | « src/ast/ast.cc ('k') | src/ast/ast-expression-visitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698