feat(compiler): include ast in compile result

This commit is contained in:
Evan You 2019-09-25 09:23:34 -04:00
parent d6852c5669
commit f79433cbb3

View 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
}