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/SyntaxParseHandler.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/SyntaxParseHandler.h')
-rw-r--r-- | js/src/frontend/SyntaxParseHandler.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/js/src/frontend/SyntaxParseHandler.h b/js/src/frontend/SyntaxParseHandler.h index 895ba6416..7de6a242e 100644 --- a/js/src/frontend/SyntaxParseHandler.h +++ b/js/src/frontend/SyntaxParseHandler.h @@ -561,6 +561,10 @@ class SyntaxParseHandler node == NodeParenthesizedName; } + bool isArgumentsAnyParentheses(Node node, ExclusiveContext* cx) { + return node == NodeUnparenthesizedArgumentsName || node == NodeParenthesizedArgumentsName; + } + bool isEvalAnyParentheses(Node node, ExclusiveContext* cx) { return node == NodeUnparenthesizedEvalName || node == NodeParenthesizedEvalName; } @@ -571,7 +575,7 @@ class SyntaxParseHandler if (isEvalAnyParentheses(node, cx)) return js_eval_str; - if (node == NodeUnparenthesizedArgumentsName || node == NodeParenthesizedArgumentsName) + if (isArgumentsAnyParentheses(node, cx)) return js_arguments_str; return nullptr; } |