(root)
| 14 | }; |
| 15 | |
| 16 | const createRootCodgen = (root) => { |
| 17 | const child = root.children[0]; |
| 18 | if (child.type === NodeTypes.ELEMENT && child.codegenNode) { |
| 19 | root.codegenNode = child.codegenNode; |
| 20 | } else { |
| 21 | root.codegenNode = child; |
| 22 | } |
| 23 | }; |
| 24 | |
| 25 | const createTransformContext = (root, options) => { |
| 26 | // 创建全局上下文对象来存储我们传入的数据 |