function extractType( str ) {
	var types;
	var match;
	var i;

	if ( contains( str, '|' ) ) {
		types = str.split( '|' );
		for ( i = 0; i < types.length; i++ ) {
			match = types[ i ].match( RE_ANGLE );
			if ( match ) {
				types[ i ] = {
					'type': 'TypedObject',
					'name': match[ 1 ],
					'of': match[ 2 ]
				};
			} else {
				types[ i ] = {
					'name': types[ i ]
				};
			}
		}
		return {
			'type': 'UnionType',
			'elements': types
		};
	}
	match = str.match( RE_ANGLE );
	if ( match ) {
		return {
			'type': 'TypedObject',
			'name': match[ 1 ],
			'of': match[ 2 ]
		};
	}
	return {
		'name': str
	};
}
Extracts the type of the given tag.

@private
@param {string} str - tag string
@returns {Object} object containing type information for the given tag