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.");
}
}