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

Side by Side Diff: src/parsing/parser.h

Issue 2169833002: [parser] Refactor AstTraversalVisitor (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
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 #ifndef V8_PARSING_PARSER_H_ 5 #ifndef V8_PARSING_PARSER_H_
6 #define V8_PARSING_PARSER_H_ 6 #define V8_PARSING_PARSER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/ast/scopes.h" 10 #include "src/ast/scopes.h"
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 848
849 Block* BuildInitializationBlock(ZoneList<const AstRawString*>* names, 849 Block* BuildInitializationBlock(ZoneList<const AstRawString*>* names,
850 bool* ok); 850 bool* ok);
851 851
852 DeclarationDescriptor descriptor; 852 DeclarationDescriptor descriptor;
853 List<Declaration> declarations; 853 List<Declaration> declarations;
854 Scanner::Location first_initializer_loc; 854 Scanner::Location first_initializer_loc;
855 Scanner::Location bindings_loc; 855 Scanner::Location bindings_loc;
856 }; 856 };
857 857
858 class PatternRewriter final : private AstVisitor<PatternRewriter> { 858 class PatternRewriter final : public AstVisitor<PatternRewriter> {
859 public: 859 public:
860 static void DeclareAndInitializeVariables( 860 static void DeclareAndInitializeVariables(
861 Block* block, const DeclarationDescriptor* declaration_descriptor, 861 Block* block, const DeclarationDescriptor* declaration_descriptor,
862 const DeclarationParsingResult::Declaration* declaration, 862 const DeclarationParsingResult::Declaration* declaration,
863 ZoneList<const AstRawString*>* names, bool* ok); 863 ZoneList<const AstRawString*>* names, bool* ok);
864 864
865 static void RewriteDestructuringAssignment(Parser* parser, 865 static void RewriteDestructuringAssignment(Parser* parser,
866 RewritableExpression* expr, 866 RewritableExpression* expr,
867 Scope* Scope); 867 Scope* Scope);
868 868
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 1315
1316 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { 1316 DoExpression* ParserTraits::ParseDoExpression(bool* ok) {
1317 return parser_->ParseDoExpression(ok); 1317 return parser_->ParseDoExpression(ok);
1318 } 1318 }
1319 1319
1320 1320
1321 } // namespace internal 1321 } // namespace internal
1322 } // namespace v8 1322 } // namespace v8
1323 1323
1324 #endif // V8_PARSING_PARSER_H_ 1324 #endif // V8_PARSING_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698