public void Compile(string scriptText) { HasErrors = false; BeforeCompile?.Invoke(this, new EventArgs()); try { scopeTable.Clear(); errorReport.Reporting = true; errorReport.ExecutionErrorDetected += errorReport_ExecutionErrorDetected; CompileInputs(scriptText); CompileExpressions(scriptText); CheckExecution(); errorReport.ExecutionErrorDetected -= errorReport_ExecutionErrorDetected; errorReport.Reporting = false; // this doesn't appear to be used... bool success = !this.errorReport.HasErrors; this.errorReport.Clear(); } catch (Exception exception) { HasErrors = true; CompileError?.Invoke(this, new CompileErrorEventArgs(exception)); } finally { AfterCompile?.Invoke(this, new EventArgs()); } }
private void Compiler_BeforeCompile(object sender, EventArgs e) { BeforeCompile?.Invoke(this, e); }