parameters: (self)
return_statement: return False
docstring: Returns whether the current statement (if any) may end in this context.
docstring_summary: Returns whether the current statement (if any) may end in this context.
docstring_tokens: Returns whether the current statement ( if any ) may end in this context .
function: def _StatementCouldEndInContext(self):
      """Returns whether the current statement (if any) may end in this context."""
      # In the basic statement or variable declaration context, statement can
      # always end in this context.
      if self._context.type in (EcmaContext.STATEMENT, EcmaContext.VAR):
        return True
  
      # End of a ternary false branch inside a statement can also be the
      # end of the statement, for example:
      # var x = foo ? foo.bar() : null
      # In this case the statement ends after the null, when the context stack
      # looks like ternary_false > var > statement > root.
      if (self._context.type == EcmaContext.TERNARY_FALSE and
          self._context.parent.type in (EcmaContext.STATEMENT, EcmaContext.VAR)):
        return True
  
      # In all other contexts like object and array literals, ternary true, etc.
      # the statement can't yet end.
      return False
function_tokens: def _StatementCouldEndInContext ( self ) : # In the basic statement or variable declaration context, statement can # always end in this context. if self . _context . type in ( EcmaContext . STATEMENT , EcmaContext . VAR ) : return True # End of a ternary false branch inside a statement can also be the # end of the statement, for example: # var x = foo ? foo.bar() : null # In this case the statement ends after the null, when the context stack # looks like ternary_false > var > statement > root. if ( self . _context . type == EcmaContext . TERNARY_FALSE and self . _context . parent . type in ( EcmaContext . STATEMENT , EcmaContext . VAR ) ) : return True # In all other contexts like object and array literals, ternary true, etc. # the statement can't yet end. return False