(ast)
| 7 | } from "./runtimeHelpers"; |
| 8 | |
| 9 | export const generate = (ast) => { |
| 10 | const context = createCodegenContext(); |
| 11 | const { push } = context; |
| 12 | |
| 13 | genFunctionPreamble(context, ast); |
| 14 | const functionName = "render"; |
| 15 | const args = ["_ctx", "_cache"]; |
| 16 | const signature = args.join(","); |
| 17 | |
| 18 | push(`function ${functionName}(${signature}){`); |
| 19 | push(`return `); |
| 20 | genNode(ast.codegenNode, context); |
| 21 | push("}"); |
| 22 | return { |
| 23 | code: context.code |
| 24 | }; |
| 25 | }; |
| 26 | const genFunctionPreamble = (context, ast) => { |
| 27 | const { push } = context; |
| 28 | const vueBinging = "Vue"; |
no test coverage detected