核心内容摘要
探索成人乐趣新维度:飞机杯教室动漫第一季,免费观影不容错过!
实现解析 text 功能测试describe(text,(){it(simple text,(){constastbaseParse(some text)expect(ast.children[0]).toStrictEqual({type:NodeTypes.TEXT,content:some text})})})思路* 如果没有命中插值和元素的话默认就走 Text 类型* 如果是 Text 类型我们取出 content 值然后推进 some text,也就是删除 some text功能实现// compiler-core/parse.tsfunctionparseChildren(context){constnodes:any[][]letnode:anyconstscontext.sourceif(s.startsWith(if(!node){// ✅ text类型nodeparseText(context)}nodes.push(node)returnnodes}functionparseText(context:any){// ✅ 解析过程//