diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2019-07-14 13:39:17 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2019-07-18 22:38:45 -0400 |
commit | a4b91b5a8faf9dc09db252c89921775910f1c233 (patch) | |
tree | 08fc210678866596e1a9e38d7b7bc3c0651306c0 /js/src/frontend/FullParseHandler.h | |
parent | 55c897db3c504c10650b94d97bb13ed79b0e23c6 (diff) | |
download | UXP-a4b91b5a8faf9dc09db252c89921775910f1c233.tar UXP-a4b91b5a8faf9dc09db252c89921775910f1c233.tar.gz UXP-a4b91b5a8faf9dc09db252c89921775910f1c233.tar.lz UXP-a4b91b5a8faf9dc09db252c89921775910f1c233.tar.xz UXP-a4b91b5a8faf9dc09db252c89921775910f1c233.zip |
1303703 - Part 3: Syntax parse destructuring assignment patterns.
Diffstat (limited to 'js/src/frontend/FullParseHandler.h')
-rw-r--r-- | js/src/frontend/FullParseHandler.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/js/src/frontend/FullParseHandler.h b/js/src/frontend/FullParseHandler.h index 7ddd8d306..c7a7e0843 100644 --- a/js/src/frontend/FullParseHandler.h +++ b/js/src/frontend/FullParseHandler.h @@ -878,6 +878,10 @@ class FullParseHandler return node->isKind(PNK_NAME); } + bool isArgumentsAnyParentheses(ParseNode* node, ExclusiveContext* cx) { + return node->isKind(PNK_NAME) && node->pn_atom == cx->names().arguments; + } + bool isEvalAnyParentheses(ParseNode* node, ExclusiveContext* cx) { return node->isKind(PNK_NAME) && node->pn_atom == cx->names().eval; } @@ -888,7 +892,7 @@ class FullParseHandler if (isEvalAnyParentheses(node, cx)) return js_eval_str; - if (node->pn_atom == cx->names().arguments) + if (isArgumentsAnyParentheses(node, cx)) return js_arguments_str; return nullptr; } |