Tale\Jade\Parser::createNode PHP Method

createNode() protected method

If a token is given, the location in the code of that token is also passed to the Node instance If no token is passed, a dummy-token with the current lexer's offset and line is created Notice that nodes are expando-objects, you can add properties on-the-fly and retrieve them as an array later
protected createNode ( string $type, array $token = null ) : Node
$type string the type the node should have
$token array the token to relate this node to
return Tale\Jade\Parser\Node The newly created node
    protected function createNode($type, array $token = null)
    {
        $token = $token ? $token : ['line' => $this->lexer->getLine(), 'offset' => $this->lexer->getOffset()];
        $node = new Node($type, $token['line'], $token['offset']);
        return $node;
    }