also defines $tag in companions of ast classes