src/parse/state/tag.js/readTagName
function readTagName ( parser ) {
	const start = parser.index;

	if ( parser.eat( SELF ) ) {
		// check we're inside a block, otherwise this
		// will cause infinite recursion
		let i = parser.stack.length;
		let legal = false;

		while ( i-- ) {
			const fragment = parser.stack[i];
			if ( fragment.type === 'IfBlock' || fragment.type === 'EachBlock' ) {
				legal = true;
				break;
			}
		}

		if ( !legal ) {
			parser.error( `<${SELF}> components can only exist inside if-blocks or each-blocks`, start );
		}

		return SELF;
	}

	const name = parser.readUntil( /(\s|\/|>)/ );

	if ( name in metaTags ) return name;

	if ( !validTagName.test( name ) ) {
		parser.error( `Expected valid tag name`, start );
	}

	return name;
}