| 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 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 int function_token_position, FunctionLiteral::FunctionType type, | 575 int function_token_position, FunctionLiteral::FunctionType type, |
| 576 LanguageMode language_mode, bool* ok); | 576 LanguageMode language_mode, bool* ok); |
| 577 V8_INLINE void SkipLazyFunctionBody( | 577 V8_INLINE void SkipLazyFunctionBody( |
| 578 int* materialized_literal_count, int* expected_property_count, bool* ok, | 578 int* materialized_literal_count, int* expected_property_count, bool* ok, |
| 579 Scanner::BookmarkScope* bookmark = nullptr); | 579 Scanner::BookmarkScope* bookmark = nullptr); |
| 580 V8_INLINE ZoneList<Statement*>* ParseEagerFunctionBody( | 580 V8_INLINE ZoneList<Statement*>* ParseEagerFunctionBody( |
| 581 const AstRawString* name, int pos, | 581 const AstRawString* name, int pos, |
| 582 const ParserFormalParameters& parameters, FunctionKind kind, | 582 const ParserFormalParameters& parameters, FunctionKind kind, |
| 583 FunctionLiteral::FunctionType function_type, bool* ok); | 583 FunctionLiteral::FunctionType function_type, bool* ok); |
| 584 | 584 |
| 585 Expression* ParseClassLiteral(Type::ExpressionClassifier* classifier, | 585 ClassLiteral* ParseClassLiteral(Type::ExpressionClassifier* classifier, |
| 586 const AstRawString* name, | 586 const AstRawString* name, |
| 587 Scanner::Location class_name_location, | 587 Scanner::Location class_name_location, |
| 588 bool name_is_strict_reserved, int pos, | 588 bool name_is_strict_reserved, int pos, |
| 589 bool* ok); | 589 bool* ok); |
| 590 | 590 |
| 591 V8_INLINE void MarkCollectedTailCallExpressions(); | 591 V8_INLINE void MarkCollectedTailCallExpressions(); |
| 592 V8_INLINE void MarkTailPosition(Expression* expression); | 592 V8_INLINE void MarkTailPosition(Expression* expression); |
| 593 | 593 |
| 594 V8_INLINE void CheckConflictingVarDeclarations(v8::internal::Scope* scope, | 594 V8_INLINE void CheckConflictingVarDeclarations(v8::internal::Scope* scope, |
| 595 bool* ok); | 595 bool* ok); |
| 596 | 596 |
| 597 class TemplateLiteral : public ZoneObject { | 597 class TemplateLiteral : public ZoneObject { |
| 598 public: | 598 public: |
| 599 TemplateLiteral(Zone* zone, int pos) | 599 TemplateLiteral(Zone* zone, int pos) |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 995 bool accept_IN, int pos, bool* ok); | 995 bool accept_IN, int pos, bool* ok); |
| 996 | 996 |
| 997 void RewriteDoExpression(Expression* expr, bool* ok); | 997 void RewriteDoExpression(Expression* expr, bool* ok); |
| 998 | 998 |
| 999 FunctionLiteral* ParseFunctionLiteral( | 999 FunctionLiteral* ParseFunctionLiteral( |
| 1000 const AstRawString* name, Scanner::Location function_name_location, | 1000 const AstRawString* name, Scanner::Location function_name_location, |
| 1001 FunctionNameValidity function_name_validity, FunctionKind kind, | 1001 FunctionNameValidity function_name_validity, FunctionKind kind, |
| 1002 int function_token_position, FunctionLiteral::FunctionType type, | 1002 int function_token_position, FunctionLiteral::FunctionType type, |
| 1003 LanguageMode language_mode, bool* ok); | 1003 LanguageMode language_mode, bool* ok); |
| 1004 | 1004 |
| 1005 Expression* ParseClassLiteral(ExpressionClassifier* classifier, | 1005 ClassLiteral* ParseClassLiteral(ExpressionClassifier* classifier, |
| 1006 const AstRawString* name, | 1006 const AstRawString* name, |
| 1007 Scanner::Location class_name_location, | 1007 Scanner::Location class_name_location, |
| 1008 bool name_is_strict_reserved, int pos, | 1008 bool name_is_strict_reserved, int pos, |
| 1009 bool* ok); | 1009 bool* ok); |
| 1010 | 1010 |
| 1011 // Magical syntax support. | 1011 // Magical syntax support. |
| 1012 Expression* ParseV8Intrinsic(bool* ok); | 1012 Expression* ParseV8Intrinsic(bool* ok); |
| 1013 | 1013 |
| 1014 // Get odd-ball literals. | 1014 // Get odd-ball literals. |
| 1015 Literal* GetLiteralUndefined(int position); | 1015 Literal* GetLiteralUndefined(int position); |
| 1016 | 1016 |
| 1017 // Check if the scope has conflicting var/let declarations from different | 1017 // Check if the scope has conflicting var/let declarations from different |
| 1018 // scopes. This covers for example | 1018 // scopes. This covers for example |
| 1019 // | 1019 // |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1319 | 1319 |
| 1320 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1320 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
| 1321 return parser_->ParseDoExpression(ok); | 1321 return parser_->ParseDoExpression(ok); |
| 1322 } | 1322 } |
| 1323 | 1323 |
| 1324 | 1324 |
| 1325 } // namespace internal | 1325 } // namespace internal |
| 1326 } // namespace v8 | 1326 } // namespace v8 |
| 1327 | 1327 |
| 1328 #endif // V8_PARSING_PARSER_H_ | 1328 #endif // V8_PARSING_PARSER_H_ |
| OLD | NEW |