核心内容摘要
Clawdbot自动化部署:GitLab CI/CD集成
实现解析 element思路区别与解析插值语法解析 element 需要不同类型和方法, 尖角号和第一个字符是字母将解析完成后的代码都删掉测试代码describe(element,(){it(simple element div,(){constastbaseParse(div/div)expect(ast.children[0]).toStrictEqual({type:NodeTypes.ELEMENT,tag:div})})})效果实现// compiler-core/src/parse.tsfunctionparseChildren(context){constnodes:any[][]letnode:anyconstscontext.sourceif(s.startsWith(nodes.push(node)returnnodes}functionparseElement(context){// ✅letelementparseTag(context,TagType.Start)// ✅ 处理前标签parseTag(context,TagType.End)// ✅ 处理后标签returnelement}functionparseTag(context,type:TagType){// ✅//