feat(compiler): include ast in compile result
This commit is contained in:
parent
d6852c5669
commit
f79433cbb3
@ -53,6 +53,7 @@ export interface CodegenOptions {
|
|||||||
|
|
||||||
export interface CodegenResult {
|
export interface CodegenResult {
|
||||||
code: string
|
code: string
|
||||||
|
ast: RootNode
|
||||||
map?: RawSourceMap
|
map?: RawSourceMap
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,6 +184,7 @@ export function generate(
|
|||||||
deindent()
|
deindent()
|
||||||
push(`}`)
|
push(`}`)
|
||||||
return {
|
return {
|
||||||
|
ast,
|
||||||
code: context.code,
|
code: context.code,
|
||||||
map: context.map ? context.map.toJSON() : undefined
|
map: context.map ? context.map.toJSON() : undefined
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user