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