public Program() { reporter = new ToolErrorReporter(true); compilerEnv = new CompilerEnvirons(); compilerEnv.SetErrorReporter(reporter); compiler = new ClassCompiler(compilerEnv); }
public virtual void SetReporter(ToolErrorReporter value) { R = value; }
private int Exec(string[] args) { R = new ToolErrorReporter(true, System.Console.Error); int arg_count = Process_options(args); if (arg_count == 0) { Option_error(ToolErrorReporter.GetMessage("msg.idswitch.no_file_argument")); return -1; } if (arg_count > 1) { Option_error(ToolErrorReporter.GetMessage("msg.idswitch.too_many_arguments")); return -1; } P = new CodePrinter(); P.SetIndentStep(4); P.SetIndentTabSize(0); try { Process_file(args[0]); } catch (IOException ex) { Print_error(ToolErrorReporter.GetMessage("msg.idswitch.io_error", ex.ToString())); return -1; } catch (EvaluatorException) { return -1; } return 0; }