summaryrefslogtreecommitdiffstats
path: root/js/src/frontend/Parser.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-07-14 15:34:51 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:45 -0400
commitaa65e8a189d81cba75f101d07ef591b751881fe8 (patch)
tree573e42e4dd56c9cb04975700dbc1c53a8703d7ef /js/src/frontend/Parser.cpp
parenta4b91b5a8faf9dc09db252c89921775910f1c233 (diff)
downloadUXP-aa65e8a189d81cba75f101d07ef591b751881fe8.tar
UXP-aa65e8a189d81cba75f101d07ef591b751881fe8.tar.gz
UXP-aa65e8a189d81cba75f101d07ef591b751881fe8.tar.lz
UXP-aa65e8a189d81cba75f101d07ef591b751881fe8.tar.xz
UXP-aa65e8a189d81cba75f101d07ef591b751881fe8.zip
Refactor abortIfSyntaxParser after destructring
Diffstat (limited to 'js/src/frontend/Parser.cpp')
-rw-r--r--js/src/frontend/Parser.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp
index c1e165db5..bbdffa064 100644
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -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,