public override TES5Target Transpile(string sourcePath, string outputPath, TES5GlobalScope globalScope, TES5MultipleScriptsScope multipleScriptsScope) { TES4CodeChunks ast = ParseOrGetFromCache(sourcePath); TES4FragmentTarget fragmentTarget = new TES4FragmentTarget(ast, outputPath); TES5Target convertedScript = this.converter.Convert(fragmentTarget, globalScope, multipleScriptsScope); return convertedScript; }
public TES5Target Convert(TES5FragmentType fragmentType, TES4FragmentTarget fragmentTarget, TES5GlobalScope globalScope, TES5MultipleScriptsScope multipleScriptsScope) { TES5FunctionCodeBlock fragment = CreateFragment(fragmentType, 0, globalScope, multipleScriptsScope, fragmentTarget.CodeChunks); TES5BlockList blockList = new TES5BlockList() { fragment }; TES5Script script = new TES5Script(globalScope, blockList, true); TES5Target target = new TES5Target(script, fragmentTarget.OutputPath); return(target); }
/* * @throws ConversionException */ public TES5Target Convert(TES4FragmentTarget fragmentTarget, TES5GlobalScope globalScope, TES5MultipleScriptsScope multipleScriptsScope) { return(fragmentFactory.Convert(TES5FragmentType.T_QF, fragmentTarget, globalScope, multipleScriptsScope)); }