File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11import * as ts from "typescript" ;
22import { CompilerOptions } from "./CompilerOptions" ;
33import { transpileError } from "./diagnostics" ;
4+ import { Block } from './LuaAST' ;
45import { LuaPrinter } from "./LuaPrinter" ;
56import { LuaTransformer } from "./LuaTransformer" ;
67import { TranspileError } from "./TranspileError" ;
@@ -36,6 +37,7 @@ function getCustomTransformers(
3637}
3738
3839export interface TranspiledFile {
40+ luaAst ?: Block ;
3941 lua ?: string ;
4042 sourceMap ?: string ;
4143 declaration ?: string ;
@@ -101,14 +103,14 @@ export function transpile({
101103
102104 const processSourceFile = ( sourceFile : ts . SourceFile ) => {
103105 try {
104- const [ luaAST , lualibFeatureSet ] = transformer . transformSourceFile ( sourceFile ) ;
106+ const [ luaAst , lualibFeatureSet ] = transformer . transformSourceFile ( sourceFile ) ;
105107 if ( ! options . noEmit && ! options . emitDeclarationOnly ) {
106108 const [ lua , sourceMap ] = printer . print (
107- luaAST ,
109+ luaAst ,
108110 lualibFeatureSet ,
109111 sourceFile . fileName
110112 ) ;
111- updateTranspiledFile ( sourceFile . fileName , { lua, sourceMap } ) ;
113+ updateTranspiledFile ( sourceFile . fileName , { luaAst , lua, sourceMap } ) ;
112114 }
113115 } catch ( err ) {
114116 if ( ! ( err instanceof TranspileError ) ) throw err ;
You can’t perform that action at this time.
0 commit comments