def emptyTag(self, namespace, name, attrs, hasChildren=False):
yield {"<STR_LIT:type>": "<STR_LIT>", "<STR_LIT:name>": name,<EOL>"<STR_LIT>": namespace,<EOL>"<STR_LIT:data>": attrs}<EOL>if hasChildren:<EOL><INDENT>yield self.error("<STR_LIT>")<EOL><DEDENT>
Generates an EmptyTag token

        :arg namespace: the namespace of the token--can be ``None``

        :arg name: the name of the element

        :arg attrs: the attributes of the element as a dict

        :arg hasChildren: whether or not to yield a SerializationError because
            this tag shouldn't have children

        :returns: EmptyTag token