Refactor abortIfSyntaxParser after destructring.

master
Fedor 2019-09-05 20:07:05 +03:00
parent d7a91d9be2
commit 6083e3130a
1 changed files with 9 additions and 9 deletions

View File

@ -757,7 +757,15 @@ ParserBase::reportNoOffset(ParseReportKind kind, bool strict, unsigned errorNumb
}
template <>
bool
inline bool
Parser<FullParseHandler>::abortIfSyntaxParser()
{
handler.disableSyntaxParser();
return true;
}
template <>
inline bool
Parser<SyntaxParseHandler>::abortIfSyntaxParser()
{
abortedSyntaxParse = true;
@ -4524,14 +4532,6 @@ Parser<ParseHandler>::arrayBindingPattern(DeclarationKind kind, YieldHandling yi
return literal;
}
template <>
bool
Parser<SyntaxParseHandler>::checkDestructuringAssignmentPattern(Node pattern,
PossibleError* possibleError /* = nullptr */)
{
return abortIfSyntaxParser();
}
template <typename ParseHandler>
typename ParseHandler::Node
Parser<ParseHandler>::destructuringDeclaration(DeclarationKind kind, YieldHandling yieldHandling,