]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
feat(compiler): include ast in compile result
authorEvan You <yyx990803@gmail.com>
Wed, 25 Sep 2019 13:23:34 +0000 (09:23 -0400)
committerEvan You <yyx990803@gmail.com>
Wed, 25 Sep 2019 13:23:34 +0000 (09:23 -0400)
packages/compiler-core/src/codegen.ts

index 0706a1505c8964bdbc18da49192b75aeb1e6f36d..62e8312502dc9836d44eaad9b47f7669ce6638d2 100644 (file)
@@ -53,6 +53,7 @@ export interface CodegenOptions {
 
 export interface CodegenResult {
   code: string
+  ast: RootNode
   map?: RawSourceMap
 }
 
@@ -183,6 +184,7 @@ export function generate(
   deindent()
   push(`}`)
   return {
+    ast,
     code: context.code,
     map: context.map ? context.map.toJSON() : undefined
   }