isBefore example


    protected function parseExpressionStatement()
    {
        $lookaheadTokens = array("{", "function", "class", array("let", "["));
        if ($this->features->asyncAwait) {
            array_splice(
                $lookaheadTokens, 3, 0,
                array(array("async", true))
            );
        }
        if (!$this->scanner->isBefore($lookaheadTokens, true) &&
            $expression = $this->isolateContext(
                array("allowIn" => true), "parseExpression"
            )
        ) {
            
            $this->assertEndOfStatement();
            $node = $this->createNode("ExpressionStatement", $expression);
            $node->setExpression($expression);
            return $this->completeNode($node);
        }
        return null;
    }
Home | Imprint | This part of the site doesn't use cookies.