private void InitializeProject(GMacProject gmacDslProject) { _dslProject = gmacDslProject; _dslCompiler = new GMacProjectCompiler(); _astRoot = null; ResetCompilationInterface(); ChangeOpenedSourceFile(null); }
private AstRoot BeginCompilation(string dslCode) { //GMacSystemUtils.InitializeGMac(); //Compile GMacDSL code into GMacAST var compiler = GMacProjectCompiler.CompileDslCode(dslCode, Application.LocalUserAppDataPath, "tempTask"); compiler.Progress.DisableAfterNextReport = true; if (compiler.Progress.History.HasErrorsOrFailures) { var formProgress = new FormProgress(compiler.Progress, null, null); formProgress.ShowDialog(this); return(null); } return(compiler.Root); }
/// <summary> /// Compile given GMacDSL code into a GMacAST structure /// </summary> /// <param name="dslCode"></param> /// <returns></returns> private static AstRoot BeginCompilation(string dslCode) { //GMacSystemUtils.InitializeGMac(); //Compile GMacDSL code into GMacAST var compiler = GMacProjectCompiler.CompileDslCode(dslCode, Application.LocalUserAppDataPath, "tempTask"); //Reduce details of progress reporting during code composition compiler.Progress.DisableAfterNextReport = true; if (compiler.Progress.History.HasErrorsOrFailures) { //Compilation of GMacDSL code failed var formProgress = new FormProgress(compiler.Progress, null, null); formProgress.ShowDialog(); return(null); } //Compilation of GMacDSL code successful, return constructed GMacAST root return(compiler.Root); }
//public static GMacSymbolTranslatorContext Create(GMacAst dsl, LanguageCompilationLog log) //{ // return new GMacSymbolTranslatorContext(dsl, log); //} public static GMacSymbolTranslatorContext Create(GMacProjectCompiler parentCompiler) { return(new GMacSymbolTranslatorContext(parentCompiler)); }