Tale\Jade\Parser::handleImport PHP Method

handleImport() protected method

Notice that "extends" and "include" are basically the same thing. The only difference is that "extends" can only exist at the very beginning of a jade-block Only "include" can have filters, though. This gets checked in the Compiler, not here
protected handleImport ( array $token )
$token array the -token
    protected function handleImport(array $token)
    {
        if ($token['importType'] === 'extends' && count($this->document->children) > 0) {
            $this->throwException("extends should be the very first statement in a document, only whitespace can precede it", $token);
        }
        $node = $this->createNode('import', $token);
        $node->importType = $token['importType'];
        $node->path = $token['path'];
        $node->filter = $token['filter'];
        $node->attributes = [];
        $node->assignments = [];
        $this->current = $node;
    }