| Index: src/parsing/parser.h
|
| diff --git a/src/parsing/parser.h b/src/parsing/parser.h
|
| index aa2d0e87cedd1df11a6e7e2387be095ea5a25405..e91ad7741aa298c40ae7fbe505286289905f2748 100644
|
| --- a/src/parsing/parser.h
|
| +++ b/src/parsing/parser.h
|
| @@ -355,6 +355,7 @@ class ParserTraits {
|
| bool IsArguments(const AstRawString* identifier) const;
|
| bool IsEvalOrArguments(const AstRawString* identifier) const;
|
| bool IsUndefined(const AstRawString* identifier) const;
|
| + bool IsAwait(const AstRawString* identifier) const;
|
| V8_INLINE bool IsFutureStrictReserved(const AstRawString* identifier) const;
|
|
|
| // Returns true if the expression is of type "this.foo".
|
| @@ -554,6 +555,8 @@ class ParserTraits {
|
| const Scanner::Location& params_loc,
|
| Scanner::Location* duplicate_loc, bool* ok);
|
|
|
| + V8_INLINE Expression* ParseAsyncFunctionExpression(bool* ok);
|
| +
|
| V8_INLINE DoExpression* ParseDoExpression(bool* ok);
|
|
|
| void ReindexLiterals(const ParserFormalParameters& parameters);
|
| @@ -637,6 +640,8 @@ class ParserTraits {
|
| ZoneList<v8::internal::Expression*>* args,
|
| int pos);
|
|
|
| + Expression* ExpressionListToExpression(ZoneList<Expression*>* args);
|
| +
|
| // Rewrite all DestructuringAssignments in the current FunctionState.
|
| V8_INLINE void RewriteDestructuringAssignments();
|
|
|
| @@ -645,6 +650,8 @@ class ParserTraits {
|
| V8_INLINE Expression* RewriteAssignExponentiation(Expression* left,
|
| Expression* right, int pos);
|
|
|
| + V8_INLINE Expression* RewriteAwaitExpression(Expression* value, int pos);
|
| +
|
| V8_INLINE void QueueDestructuringAssignmentForRewriting(
|
| Expression* assignment);
|
| V8_INLINE void QueueNonPatternForRewriting(Expression* expr);
|
| @@ -772,7 +779,13 @@ class Parser : public ParserBase<ParserTraits> {
|
| Statement* ParseFunctionDeclaration(bool* ok);
|
| Statement* ParseHoistableDeclaration(ZoneList<const AstRawString*>* names,
|
| bool* ok);
|
| - Statement* ParseHoistableDeclaration(int pos, bool is_generator,
|
| + Statement* ParseHoistableDeclaration(int pos, ParseFunctionFlags flags,
|
| + ZoneList<const AstRawString*>* names,
|
| + bool* ok);
|
| + Statement* ParseAsyncFunctionDeclaration(ZoneList<const AstRawString*>* names,
|
| + bool* ok);
|
| + Expression* ParseAsyncFunctionExpression(bool* ok);
|
| + Statement* ParseFunctionDeclaration(int pos, bool is_generator,
|
| ZoneList<const AstRawString*>* names,
|
| bool* ok);
|
| Statement* ParseClassDeclaration(ZoneList<const AstRawString*>* names,
|
| @@ -1255,6 +1268,9 @@ void ParserTraits::AddParameterInitializationBlock(
|
| }
|
| }
|
|
|
| +Expression* ParserTraits::ParseAsyncFunctionExpression(bool* ok) {
|
| + return parser_->ParseAsyncFunctionExpression(ok);
|
| +}
|
|
|
| DoExpression* ParserTraits::ParseDoExpression(bool* ok) {
|
| return parser_->ParseDoExpression(ok);
|
|
|