Tale\Jade\Parser::handleId PHP Method

handleId() protected method

If no $_current element exists, a new one is created IDs can only exist on elements an mixin calls They will get converted to attribute-nodes and appended to the current element
protected handleId ( array $token )
$token array the -token
    protected function handleId(array $token)
    {
        if (!$this->current) {
            $this->current = $this->createElement();
        }
        if (!in_array($this->current->type, ['element', 'mixinCall'])) {
            $this->throwException("IDs can only be used on elements and mixin calls, not on {$this->current->type}", $token);
        }
        $attr = $this->createNode('attribute', $token);
        $attr->name = 'id';
        $attr->value = $token['name'];
        $attr->escaped = false;
        $this->current->attributes[] = $attr;
    }