| OLD | NEW |
| 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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 V8_INLINE DoExpression* ParseDoExpression(bool* ok); | 562 V8_INLINE DoExpression* ParseDoExpression(bool* ok); |
| 563 | 563 |
| 564 void ReindexLiterals(const ParserFormalParameters& parameters); | 564 void ReindexLiterals(const ParserFormalParameters& parameters); |
| 565 | 565 |
| 566 // Temporary glue; these functions will move to ParserBase. | 566 // Temporary glue; these functions will move to ParserBase. |
| 567 Expression* ParseV8Intrinsic(bool* ok); | 567 Expression* ParseV8Intrinsic(bool* ok); |
| 568 FunctionLiteral* ParseFunctionLiteral( | 568 FunctionLiteral* ParseFunctionLiteral( |
| 569 const AstRawString* name, Scanner::Location function_name_location, | 569 const AstRawString* name, Scanner::Location function_name_location, |
| 570 FunctionNameValidity function_name_validity, FunctionKind kind, | 570 FunctionNameValidity function_name_validity, FunctionKind kind, |
| 571 int function_token_position, FunctionLiteral::FunctionType type, | 571 int function_token_position, FunctionLiteral::FunctionType type, |
| 572 FunctionLiteral::ArityRestriction arity_restriction, | |
| 573 LanguageMode language_mode, bool* ok); | 572 LanguageMode language_mode, bool* ok); |
| 574 V8_INLINE void SkipLazyFunctionBody( | 573 V8_INLINE void SkipLazyFunctionBody( |
| 575 int* materialized_literal_count, int* expected_property_count, bool* ok, | 574 int* materialized_literal_count, int* expected_property_count, bool* ok, |
| 576 Scanner::BookmarkScope* bookmark = nullptr); | 575 Scanner::BookmarkScope* bookmark = nullptr); |
| 577 V8_INLINE ZoneList<Statement*>* ParseEagerFunctionBody( | 576 V8_INLINE ZoneList<Statement*>* ParseEagerFunctionBody( |
| 578 const AstRawString* name, int pos, | 577 const AstRawString* name, int pos, |
| 579 const ParserFormalParameters& parameters, FunctionKind kind, | 578 const ParserFormalParameters& parameters, FunctionKind kind, |
| 580 FunctionLiteral::FunctionType function_type, bool* ok); | 579 FunctionLiteral::FunctionType function_type, bool* ok); |
| 581 | 580 |
| 582 ClassLiteral* ParseClassLiteral(const AstRawString* name, | 581 ClassLiteral* ParseClassLiteral(const AstRawString* name, |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 927 Scope* inner_scope, VariableMode mode, | 926 Scope* inner_scope, VariableMode mode, |
| 928 ZoneList<const AstRawString*>* names, ForStatement* loop, Statement* init, | 927 ZoneList<const AstRawString*>* names, ForStatement* loop, Statement* init, |
| 929 Expression* cond, Statement* next, Statement* body, bool* ok); | 928 Expression* cond, Statement* next, Statement* body, bool* ok); |
| 930 | 929 |
| 931 void RewriteDoExpression(Expression* expr, bool* ok); | 930 void RewriteDoExpression(Expression* expr, bool* ok); |
| 932 | 931 |
| 933 FunctionLiteral* ParseFunctionLiteral( | 932 FunctionLiteral* ParseFunctionLiteral( |
| 934 const AstRawString* name, Scanner::Location function_name_location, | 933 const AstRawString* name, Scanner::Location function_name_location, |
| 935 FunctionNameValidity function_name_validity, FunctionKind kind, | 934 FunctionNameValidity function_name_validity, FunctionKind kind, |
| 936 int function_token_position, FunctionLiteral::FunctionType type, | 935 int function_token_position, FunctionLiteral::FunctionType type, |
| 937 FunctionLiteral::ArityRestriction arity_restriction, | |
| 938 LanguageMode language_mode, bool* ok); | 936 LanguageMode language_mode, bool* ok); |
| 939 | 937 |
| 940 | 938 |
| 941 ClassLiteral* ParseClassLiteral(const AstRawString* name, | 939 ClassLiteral* ParseClassLiteral(const AstRawString* name, |
| 942 Scanner::Location class_name_location, | 940 Scanner::Location class_name_location, |
| 943 bool name_is_strict_reserved, int pos, | 941 bool name_is_strict_reserved, int pos, |
| 944 bool* ok); | 942 bool* ok); |
| 945 | 943 |
| 946 // Magical syntax support. | 944 // Magical syntax support. |
| 947 Expression* ParseV8Intrinsic(bool* ok); | 945 Expression* ParseV8Intrinsic(bool* ok); |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1226 | 1224 |
| 1227 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1225 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
| 1228 return parser_->ParseDoExpression(ok); | 1226 return parser_->ParseDoExpression(ok); |
| 1229 } | 1227 } |
| 1230 | 1228 |
| 1231 | 1229 |
| 1232 } // namespace internal | 1230 } // namespace internal |
| 1233 } // namespace v8 | 1231 } // namespace v8 |
| 1234 | 1232 |
| 1235 #endif // V8_PARSING_PARSER_H_ | 1233 #endif // V8_PARSING_PARSER_H_ |
| OLD | NEW |