Tale\Jade\Parser::handleAttributeStart PHP Method

handleAttributeStart() protected method

Attributes can only start on elements, assignments, imports, mixins and mixinCalls After that, all following -tokens are handled. After that, an -token is expected (When I think about it, the Lexer kind of does that already)
protected handleAttributeStart ( array $token )
$token array the -token
    protected function handleAttributeStart(array $token)
    {
        if (!$this->current) {
            $this->current = $this->createElement();
        }
        if (!in_array($this->current->type, ['element', 'assignment', 'import', 'variable', 'mixin', 'mixinCall'])) {
            $this->throwException("Attributes can only be placed on elements, assignments, imports, variables, mixins and mixin calls, not on {$this->current->type}");
        }
        foreach ($this->lookUpNext(['attribute']) as $subToken) {
            $this->handleToken($subToken);
        }
        if (!$this->expect(['attributeEnd'])) {
            $this->throwException("No attributeEnd token was found. That is unexpected. Please report this behavior.", $token);
        }
    }