Index: src/parsing/parser.h |
diff --git a/src/parsing/parser.h b/src/parsing/parser.h |
index f03efdc72297fc178de4c40dd1ec3b5eb96c4274..7d50221334d7e559ea760dd939da061da553bc52 100644 |
--- a/src/parsing/parser.h |
+++ b/src/parsing/parser.h |
@@ -649,6 +649,16 @@ class ParserTraits { |
void SetFunctionNameFromIdentifierRef(Expression* value, |
Expression* identifier); |
+ // Rewrite expressions that are not used as patterns |
+ V8_INLINE Expression* RewriteNonPattern( |
+ Expression* expr, const ExpressionClassifier* classifier, bool* ok); |
+ V8_INLINE ZoneList<Expression*>* RewriteNonPatternArguments( |
+ ZoneList<Expression*>* args, const ExpressionClassifier* classifier, |
+ bool* ok); |
+ V8_INLINE ObjectLiteralProperty* RewriteNonPatternObjectLiteralProperty( |
+ ObjectLiteralProperty* property, const ExpressionClassifier* classifier, |
+ bool* ok); |
+ |
private: |
Parser* parser_; |
}; |
@@ -1003,6 +1013,15 @@ class Parser : public ParserBase<ParserTraits> { |
V8_INLINE void RewriteDestructuringAssignments(); |
+ V8_INLINE Expression* RewriteNonPattern( |
+ Expression* expr, const ExpressionClassifier* classifier, bool* ok); |
+ V8_INLINE ZoneList<Expression*>* RewriteNonPatternArguments( |
+ ZoneList<Expression*>* args, const ExpressionClassifier* classifier, |
+ bool* ok); |
+ V8_INLINE ObjectLiteralProperty* RewriteNonPatternObjectLiteralProperty( |
+ ObjectLiteralProperty* property, const ExpressionClassifier* classifier, |
+ bool* ok); |
+ |
friend class InitializerRewriter; |
void RewriteParameterInitializer(Expression* expr, Scope* scope); |