diff options
author | Matt A. Tobin <email@mattatobin.com> | 2022-05-05 16:49:07 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2022-05-05 16:49:07 -0500 |
commit | 2678e7f06f0e13e617046bd270f25b8358be5f15 (patch) | |
tree | 0e5fa7827860e5d576e64e96b6103ac73f68543f /js/src/frontend/ParseNode.cpp | |
parent | 5033dbca32609b69c512e0edd0b4fc40d220de67 (diff) | |
download | aura-central-2678e7f06f0e13e617046bd270f25b8358be5f15.tar.gz |
[JS:Engine] Implement the Optional Chaining operator (?.)
Diffstat (limited to 'js/src/frontend/ParseNode.cpp')
-rw-r--r-- | js/src/frontend/ParseNode.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/js/src/frontend/ParseNode.cpp b/js/src/frontend/ParseNode.cpp index 623346563..dfbd724e2 100644 --- a/js/src/frontend/ParseNode.cpp +++ b/js/src/frontend/ParseNode.cpp @@ -228,6 +228,8 @@ PushNodeChildren(ParseNode* pn, NodeStack* stack) return PushUnaryNodeChild(pn, stack); // Nodes with a single nullable child. + case PNK_OPTCHAIN: + case PNK_DELETEOPTCHAIN: case PNK_THIS: case PNK_SEMI: { MOZ_ASSERT(pn->isArity(PN_UNARY)); @@ -253,6 +255,7 @@ PushNodeChildren(ParseNode* pn, NodeStack* stack) case PNK_MODASSIGN: case PNK_POWASSIGN: // ...and a few others. + case PNK_OPTELEM: case PNK_ELEM: case PNK_IMPORT_SPEC: case PNK_EXPORT_SPEC: @@ -449,6 +452,7 @@ PushNodeChildren(ParseNode* pn, NodeStack* stack) case PNK_POW: case PNK_COMMA: case PNK_NEW: + case PNK_OPTCALL: case PNK_CALL: case PNK_SUPERCALL: case PNK_GENEXP: @@ -483,6 +487,7 @@ PushNodeChildren(ParseNode* pn, NodeStack* stack) } case PNK_LABEL: + case PNK_OPTDOT: case PNK_DOT: case PNK_NAME: return PushNameNodeChildren(pn, stack); |