Tale\Jade\Parser::handleAssignment PHP Method

handleAssignment() protected method

If no there is no $_current element, a new one is created Assignments are possible on elements and mixinCalls only After an assignment, an attribute block is required
protected handleAssignment ( array $token )
$token array the -token
    protected function handleAssignment(array $token)
    {
        if (!$this->current) {
            $this->current = $this->createElement();
        }
        if (!in_array($this->current->type, ['element', 'mixinCall'])) {
            $this->throwException("You can use assignment-syntax ([`&name(..values..)`]) only mixin calls and HTML elements only, not on {$this->current->type}");
        }
        $node = $this->createNode('assignment', $token);
        $node->name = $token['name'];
        $this->current->assignments[] = $node;
        if ($this->expectNext(['attributeStart'])) {
            $element = $this->current;
            $this->current = $node;
            $this->handleToken();
            $this->current = $element;
        } else {
            $this->throwException("The assignment-syntax ([`&name(..values..)`]) requires an attribute block with passed values.");
        }
    }