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