Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
optional-chaining-productions.md

Statement List

  • UpdateExpression[Yield, Await]

      • OptionalExpression[Yield, Await]
        • MemberExpression[Yield, Await] (member-expression.js)
          • PrimaryExpression[?Yield, ?Await]
            • this
            • IdentifierReference[?Yield, ?Await]
              • Identifier
            • Literal
            • ArrayLiteral[?Yield, ?Await]
            • ObjectLiteral[?Yield, ?Await]
            • FunctionExpression
            • ClassExpression[?Yield, ?Await]
            • GeneratorExpression
            • AsyncFunctionExpression
            • AsyncGeneratorExpression
            • RegularExpressionLiteral
            • TemplateLiteral[?Yield, ?Await, ~Tagged]
            • CoverParenthesizedExpressionAndArrowParameterList[?Yield, ?Await]
          • MemberExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
          • MemberExpression[?Yield, ?Await].IdentifierName
          • MemberExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await, +Tagged]
          • SuperProperty[?Yield, ?Await]
          • MetaProperty
          • newMemberExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
        • CallExpression[Yield, Await] (call-expression.js)
          • CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
          • SuperCall[?Yield, ?Await]
          • CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
          • CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
          • CallExpression[?Yield, ?Await].IdentifierName
          • CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await, +Tagged]
        • OptionalExpression[Yield, Await]
          • MemberExpression[?Yield, ?Await]OptionalChain[?Yield, ?Await]
          • CallExpression[?Yield, ?Await]OptionalChain[?Yield, ?Await]
      • OptionalExpression[no LineTerminator here]++ (invalid) (update-expression.js)
      • OptionalExpression[no LineTerminator here]-- (invalid) (update-expression.js)
      • ++OptionalExpression[?Yield, ?Await] (invalid) (update-expression.js)
      • --OptionalExpression[?Yield, ?]Await] (invalid) (update-expression.js)
  • AssignmentExpression[In, Yield, Await] (assignment-expression.js)

      • ConditionalExpression[?In, ?Yield, ?Await]
      • ArrowFunction[?In, ?Yield, ?Await]
      • AsyncArrowFunction[?In, ?Yield, ?Await]
      • OptionalExpression[Yield?, Await?] = AssignmentExpression[?In, ?Yield, ?Await] (invalid)
      • OptionalExpression AssignmentOperatorAssignmentExpression[?In, ?Yield, ?Await] (invalid)
  • DestructuringAssignmentTarget[Yield, Await] (assignment-expression.js)

    • OptionalExpression[?Yield, ?Await]
  • IterationStatement[Yield, Await, Return]: (iteration-statement.js)

      • doStatement[?Yield, ?Await, ?Return] while(Expression[+In, ?Yield, ?Await]);
      • while(Expression[+In, ?Yield, ?Await]) Statement[?Yield, ?Await, ?Return]
      • for([lookahead ∉ { let [ }]Expression[~In, ?Yield, ?Await]opt;Expression[+In, ?Yield, ?Await]opt;Expression[+In, ?Yield, ?Await]opt)Statement[?Yield, ?Await, ?Return]
      • for(varVariableDeclarationList[~In, ?Yield, ?Await];Expression[+In, ?Yield, ?Await]opt;Expression[+In, ?Yield, ?Await]opt)Statement[?Yield, ?Await, ?Return]
      • for(LexicalDeclaration[~In, ?Yield, ?Await]Expression[+In, ?Yield, ?Await]opt;Expression[+In, ?Yield, ?Await]opt)Statement[?Yield, ?Await, ?Return]
      • for([lookahead ∉ { let [ }]LeftHandSideExpression[?Yield, ?Await]inExpression[+In, ?Yield, ?Await])Statement[?Yield, ?Await, ?Return]
      • for(varForBinding[?Yield, ?Await]inExpression[+In, ?Yield, ?Await])Statement[?Yield, ?Await, ?Return]
      • for(ForDeclaration[?Yield, ?Await]inExpression[+In, ?Yield, ?Await])Statement[?Yield, ?Await, ?Return]
      • for([lookahead ≠ let]LeftHandSideExpression[?Yield, ?Await]ofAssignmentExpression[+In, ?Yield, ?Await])Statement[?Yield, ?Await, ?Return]
      • for(varForBinding[?Yield, ?Await]ofAssignmentExpression[+In, ?Yield, ?Await])Statement[?Yield, ?Await, ?Return]
      • for(ForDeclaration[?Yield, ?Await]ofAssignmentExpression[+In, ?Yield, ?Await])Statement[?Yield, ?Await, ?Return]
  • ClassHeritage[Yield, Await]: (class-heritage.js)

      • extends OptionalExpression[?Yield, ?Await]

Async Function

  • UpdateExpression[Yield, Await]

      • OptionalExpression[Yield, Await]
        • MemberExpression[Yield, Await] (async-member-expression.js)
          • PrimaryExpression[?Yield, ?Await]
            • this
            • IdentifierReference[?Yield, ?Await]
              • Identifier
              • await Identifier
            • Literal
            • ArrayLiteral[?Yield, ?Await]
            • ObjectLiteral[?Yield, ?Await]
            • FunctionExpression
            • ClassExpression[?Yield, ?Await]
            • GeneratorExpression
            • AsyncFunctionExpression
            • AsyncGeneratorExpression
            • RegularExpressionLiteral
            • TemplateLiteral[?Yield, ?Await, ~Tagged]
            • CoverParenthesizedExpressionAndArrowParameterList[?Yield, ?Await]
          • MemberExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
          • MemberExpression[?Yield, ?Await].IdentifierName
          • MemberExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await, +Tagged]
          • SuperProperty[?Yield, ?Await]
          • MetaProperty
          • newMemberExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
        • CallExpression[Yield, Await] (async-call-expression.js)
          • CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
          • SuperCall[?Yield, ?Await]
          • CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
          • CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
          • CallExpression[?Yield, ?Await].IdentifierName
          • CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await, +Tagged]
        • OptionalExpression[Yield, Await]
          • MemberExpression[?Yield, ?Await]OptionalChain[?Yield, ?Await]
          • CallExpression[?Yield, ?Await]OptionalChain[?Yield, ?Await]
      • OptionalExpression[no LineTerminator here]++ (invalid) (async-update-expression.js)
      • OptionalExpression[no LineTerminator here]-- (invalid) (async-update-expression.js)
      • ++OptionalExpression[?Yield, ?Await] (invalid) (async-update-expression.js)
      • --OptionalExpression[?Yield, ?]Await] (invalid) (async-update-expression.js)
  • AssignmentExpression[In, Yield, Await] (async-assignment-expression.js)

      • ConditionalExpression[?In, ?Yield, ?Await]
      • ArrowFunction[?In, ?Yield, ?Await]
      • AsyncArrowFunction[?In, ?Yield, ?Await]
      • OptionalExpression[Yield?, Await?] = AssignmentExpression[?In, ?Yield, ?Await] (invalid)
      • OptionalExpression AssignmentOperatorAssignmentExpression[?In, ?Yield, ?Await] (invalid)
  • DestructuringAssignmentTarget[Yield, Await] (async-assignment-expression.js)

    • OptionalExpression[?Yield, ?Await]
  • IterationStatement[Yield, Await, Return]: (async-iteration-statement.js)

      • doStatement[?Yield, ?Await, ?Return] while(Expression[+In, ?Yield, ?Await]);
      • while(Expression[+In, ?Yield, ?Await]) Statement[?Yield, ?Await, ?Return]
      • for([lookahead ∉ { let [ }]Expression[~In, ?Yield, ?Await]opt;Expression[+In, ?Yield, ?Await]opt;Expression[+In, ?Yield, ?Await]opt)Statement[?Yield, ?Await, ?Return]
      • for(varVariableDeclarationList[~In, ?Yield, ?Await];Expression[+In, ?Yield, ?Await]opt;Expression[+In, ?Yield, ?Await]opt)Statement[?Yield, ?Await, ?Return]
      • for(LexicalDeclaration[~In, ?Yield, ?Await]Expression[+In, ?Yield, ?Await]opt;Expression[+In, ?Yield, ?Await]opt)Statement[?Yield, ?Await, ?Return]
      • for([lookahead ∉ { let [ }]LeftHandSideExpression[?Yield, ?Await]inExpression[+In, ?Yield, ?Await])Statement[?Yield, ?Await, ?Return]
      • for(varForBinding[?Yield, ?Await]inExpression[+In, ?Yield, ?Await])Statement[?Yield, ?Await, ?Return]
      • for(ForDeclaration[?Yield, ?Await]inExpression[+In, ?Yield, ?Await])Statement[?Yield, ?Await, ?Return]
      • for([lookahead ≠ let]LeftHandSideExpression[?Yield, ?Await]ofAssignmentExpression[+In, ?Yield, ?Await])Statement[?Yield, ?Await, ?Return]
      • for(varForBinding[?Yield, ?Await]ofAssignmentExpression[+In, ?Yield, ?Await])Statement[?Yield, ?Await, ?Return]
      • for(ForDeclaration[?Yield, ?Await]ofAssignmentExpression[+In, ?Yield, ?Await])Statement[?Yield, ?Await, ?Return]
      • [+Await]forawait([lookahead ≠ let]LeftHandSideExpression[?Yield, ?Await]ofAssignmentExpression[+In, ?Yield, ?Await])Statement[?Yield, ?Await, ?Return]
      • [+Await]forawait(varForBinding[?Yield, ?Await]ofAssignmentExpression[+In, ?Yield, ?Await])Statement[?Yield, ?Await, ?Return]
      • [+Await]forawait(ForDeclaration[?Yield, ?Await]ofAssignmentExpression[+In, ?Yield, ?Await])Statement[?Yield, ?Await, ?Return]

Iterator Function

  • UpdateExpression[Yield, Await]

      • OptionalExpression[Yield, Await]
        • MemberExpression[Yield, Await] (iterator-member-expression.js)
          • PrimaryExpression[?Yield, ?Await]
            • this
            • IdentifierReference[?Yield, ?Await]
              • yield Identifier
  • AssignmentExpression[In, Yield, Await] (iterator-assignment-expression.js)

      • [+Yield]YieldExpression[?In, ?Await]

Optional Chain

    • ?.[Expression]
      • OptionalChain[OptionalExpression]
    • ?.IdentifierName
    • ?.Arguments
    • ?.TemplateLiteral
    • OptionalChain[Expression]
    • OptionalChain.IdentifierName
    • OptionalChain Arguments
    • OptionalChain[?Yield, ?Await]TemplateLiteral[?Yield, ?Await, +Tagged]

Optional Chain Async

    • ?.[Expression]
    • ?.IdentifierName
    • ?.Arguments
    • ?.TemplateLiteral
    • OptionalChain[Expression]
      • OptionalChain[OptionalExpression]
    • OptionalChain.IdentifierName
    • OptionalChain Arguments
    • OptionalChain[?Yield, ?Await]TemplateLiteral[?Yield, ?Await, +Tagged]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment