docs: function parse(text) {
  	//位置: 主位置, 引入, 功能, 子功能, 功能结束符, 语句, 表达式
  	let index = 0,
  	    include = 0,
  	    func = 0,
  	    subfunc = 0,
  	    end = 0,
  	    script = 0,
  	    sentence = 0;
  	//根, 当前位置
  	let root = { list: [], main: null, sub: [] },
  	    current = root;
  	root.main = root;
  	do {
  		//首先查找各起点位置
  		if (include !== -1) {
  			include = text.indexOf("<#", index);
  		}
  		if (func !== -1) {
  			func = text.indexOf("<@", index);
  		}
  		if (subfunc !== -1) {
  			subfunc = text.indexOf("<|", index);
  		}
  		if (end !== -1) {
  			end = text.indexOf("</>", index);
  		}
  		if (script !== -1) {
  			script = text.indexOf("<`", index);
  		}
  		if (sentence !== -1) {
  			sentence = text.indexOf("<%", index);
  		}
  		//选中的类型, 新的位置
  		let type = '',
  		    newindex = text.length;
  		//找出最靠前的起点及类型
  		if (include !== -1 && include < newindex) {
  			newindex = include;
  			type = 'include';
  		}
  		if (func !== -1 && func < newindex) {
  			newindex = func;
  			type = 'func';
  		}
  		if (subfunc !== -1 && subfunc < newindex) {
  			newindex = subfunc;
  			type = 'subfunc';
  		}
  		if (end !== -1 && end < newindex) {
  			newindex = end;
  			type = 'end';
  		}
  		if (script !== -1 && script < newindex) {
  			newindex = script;
  			type = 'script';
  		}
  		if (sentence !== -1 && sentence < newindex) {
  			newindex = sentence;
  			type = '%';
  		}
  		//将中间字符加入队列
  		if (index < newindex) {
  			current.list.push({ type: "text", value: text.substring(index, newindex) });
  		}
  		index = newindex;
  		switch (type) {
  			case 'include':
  			case 'func':
  			case 'subfunc':
  			case 'script':
  			case '%':
  				//没有数据则直接返回
  				if (!text.substr(index + 2, 1)) {
  					break;
  				}
  				//获取标签信息
  				let taginfo = parseTag(text, index + 2, { 'include': '/', 'func': '', 'subfunc': '', 'script': '`', '%': '%' }[type]);
  				if (!taginfo) {
  					//无信息表示数据无效
  					current.list.push({ type: "text", value: "<" });
  					index++;
  				} else if (type === 'include') {
  					//包含文件
  					index = taginfo.index;
  					let tag = { type, value: Script(taginfo.value) };
  					current.list.push(tag);
  				} else if (type === '%') {
  					//表达式
  					//设置新下标
  					index = taginfo.index;
  					let tag = { type: null, value: null };
  					//获取首字符，进行进一步类型判断
  					let ch = taginfo.value[0];
  					//输出
  					if (ch === "=") {
  						tag.type = 'echo';tag.value = Script(taginfo.value.substr(1));
  					}
  					//脚本
  					else {
  							tag.type = 'script';tag.value = Script(taginfo.value);
  						}
  					//加入列表
  					current.list.push(tag);
  				} else if (type === 'script') {
  					//表达式
  					//设置新下标
  					index = taginfo.index;
  					let tag = { type: null, value: null };
  					//获取首字符，进行进一步类型判断
  					let ch = taginfo.value[0];
  					if (ch === "=") {
  						//输出
  						tag.type = 'echo';
  						tag.value = Script(taginfo.value.substr(1));
  					} else if (ch === "`") {
  						//不解析脚本
  						let v = taginfo.value,
  						    i = 1,
  						    j = v.length - 1;
  						while (v[i] === '`') {
  							i++;
  						}
  						while (v[j] === '`') {
  							j--;
  						}
  						if (j <= i) {
  							break;
  						}
  						tag.type = 'sentence';
  						tag.value = Script(taginfo.value.substr(i, j + 1));
  					} else {
  						//脚本
  						tag.type = 'script';
  						tag.value = Script(taginfo.value);
  					}
  					//加入列表
  					current.list.push(tag);
  				} else if (type === 'func' || type === 'subfunc') {
  					//功能, 子功能
  					//标签解析
  					let funcInfo = parseFunc(taginfo.value);
  					if (!funcInfo) {
  						//标签解析失败
  						current.list.push({ type: "text", value: "<" });
  						index++;
  					} else {
  						index = taginfo.index;
  						if (type === 'func') {
  							//创建
  							let tag = {
  								type: 'func', parent: current, list: [],
  								name: funcInfo.name, value: funcInfo.value,
  								attr: funcInfo.attr,
  								main: null, sub: []
  							};
  							tag.main = tag;
  							current.list.push(tag);
  							if (!taginfo.closed) {
  								current = tag;
  							}
  						} else if (type === 'subfunc') {
  							let tag = {
  								list: [], parent: current.parent,
  								name: funcInfo.name, value: funcInfo.value,
  								attr: funcInfo.attr, main: current.main
  							};
  							current.main.sub.push(tag);
  							delete current.main;
  							delete current.parent;
  							current = tag;
  							if (taginfo.closed && current !== root) {
  								let parent = current.parent;
  								delete current.parent;
  								delete current.main;
  								current = parent;
  							}
  						}
  					}
  				} else {
  					index = taginfo.index;
  					let tag = { type: type, value: null };
  					tag.value = Script(taginfo.value);
  					current.list.push(tag);
  				}
  				break;
  			case 'end':
  				if (current !== root) {
  					let parent = current.parent;
  					delete current.parent;
  					delete current.main;
  					current = parent;
  				}
  				index += 3;
  				break;
  		}
  	} while (subfunc !== -1 || func !== -1 || end !== -1 || include !== -1 || script !== -1 || sentence !== -1);
  	return root.list;
  }