docs: function parseTag(position, tokens) {
  	let token;
  	let tag = {
  		name : null,
  		self : false,
  		open : true
  	};
  
  	while (token = tokens[position++]) {
  		// tag's end found so parsing must stop
  		if (token.type === TokenTypes.TagEnd) {
  			break;
  		}
  
  		// save the tag's name and continue parsing
  		if (!tag.name && token.type === TokenTypes.TagName) {
  			tag.name = token.value;
  			continue;
  		}
  
  		// if a "/" is found after the tag's name, then it's a self-closing tag
  		if (token.type === TokenTypes.TagClose) {
  			tag.self = tag.open = !!tag.name;
  		}
  	}
  
  	return tag;
  }