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

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

Issue 1900033003: Disallow generator declarations in certain locations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 Scanner::Location* reserved_loc, bool* ok); 753 Scanner::Location* reserved_loc, bool* ok);
754 ZoneList<ImportDeclaration*>* ParseNamedImports(int pos, bool* ok); 754 ZoneList<ImportDeclaration*>* ParseNamedImports(int pos, bool* ok);
755 Statement* ParseStatement(ZoneList<const AstRawString*>* labels, 755 Statement* ParseStatement(ZoneList<const AstRawString*>* labels,
756 AllowLabelledFunctionStatement allow_function, 756 AllowLabelledFunctionStatement allow_function,
757 bool* ok); 757 bool* ok);
758 Statement* ParseSubStatement(ZoneList<const AstRawString*>* labels, 758 Statement* ParseSubStatement(ZoneList<const AstRawString*>* labels,
759 AllowLabelledFunctionStatement allow_function, 759 AllowLabelledFunctionStatement allow_function,
760 bool* ok); 760 bool* ok);
761 Statement* ParseStatementAsUnlabelled(ZoneList<const AstRawString*>* labels, 761 Statement* ParseStatementAsUnlabelled(ZoneList<const AstRawString*>* labels,
762 bool* ok); 762 bool* ok);
763 Statement* ParseOnlyFunctionDeclaration(bool* ok);
763 Statement* ParseFunctionDeclaration(ZoneList<const AstRawString*>* names, 764 Statement* ParseFunctionDeclaration(ZoneList<const AstRawString*>* names,
adamk 2016/04/20 19:09:28 Perhaps these could be called "ParseHoistableDecla
Dan Ehrenberg 2016/04/26 22:24:19 Done
764 bool* ok); 765 bool* ok);
765 Statement* ParseFunctionDeclaration(int pos, bool is_generator, 766 Statement* ParseFunctionDeclaration(int pos, bool is_generator,
766 ZoneList<const AstRawString*>* names, 767 ZoneList<const AstRawString*>* names,
767 bool* ok); 768 bool* ok);
768 Statement* ParseClassDeclaration(ZoneList<const AstRawString*>* names, 769 Statement* ParseClassDeclaration(ZoneList<const AstRawString*>* names,
769 bool* ok); 770 bool* ok);
770 Statement* ParseNativeDeclaration(bool* ok); 771 Statement* ParseNativeDeclaration(bool* ok);
771 Block* ParseBlock(ZoneList<const AstRawString*>* labels, bool* ok); 772 Block* ParseBlock(ZoneList<const AstRawString*>* labels, bool* ok);
772 Block* ParseBlock(ZoneList<const AstRawString*>* labels, 773 Block* ParseBlock(ZoneList<const AstRawString*>* labels,
773 bool finalize_block_scope, bool* ok); 774 bool finalize_block_scope, bool* ok);
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 1248
1248 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { 1249 DoExpression* ParserTraits::ParseDoExpression(bool* ok) {
1249 return parser_->ParseDoExpression(ok); 1250 return parser_->ParseDoExpression(ok);
1250 } 1251 }
1251 1252
1252 1253
1253 } // namespace internal 1254 } // namespace internal
1254 } // namespace v8 1255 } // namespace v8
1255 1256
1256 #endif // V8_PARSING_PARSER_H_ 1257 #endif // V8_PARSING_PARSER_H_
OLDNEW
« no previous file with comments | « src/messages.h ('k') | src/parsing/parser.cc » ('j') | src/parsing/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698