@@ -0,0 +1,2073 @@
+package error;%0A%0Aimport parse.Loc;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport java.util.function.Consumer;%0A%0Apublic class ErrorManager %7B%0A   public static final ErrorManager em = new ErrorManager();%0A%0A   private int errorsCounter;%0A   private int warningsCounter;%0A   private int fatalsCounter;%0A%0A   private List%3CString%3E errors;%0A%0A   private Consumer%3CString%3E show;%0A%0A   private ErrorManager() %7B%0A      this.errorsCounter = 0;%0A      this.warningsCounter = 0;%0A      this.fatalsCounter = 0;%0A      this.errors = new ArrayList%3C%3E();%0A      this.show = System.out::println;%0A   %7D%0A%0A   @Override%0A   public String toString() %7B%0A      return %22ErrorManager%7B%22 +%0A             %22errorsCounter=%22 + errorsCounter +%0A             %22, warningsCounter=%22 + warningsCounter +%0A             %22, fatalsCounter=%22 + fatalsCounter +%0A             %22, errors=%22 + errors +%0A             %22, show=%22 + show +%0A             '%7D';%0A   %7D%0A%0A   private void message(String text) %7B%0A      errors.add(text);%0A      show.accept(text);%0A   %7D%0A%0A   private void message(String format, Object... args) %7B%0A      message(String.format(format, args));%0A   %7D%0A%0A   public void error(String format, Object... args) %7B%0A      errorsCounter++;%0A      message(%22ERROR: %22 + format, args);%0A   %7D%0A%0A   public void error(Loc loc, String format, Object... args) %7B%0A      error(loc + %22 %22 + format, args);%0A   %7D%0A%0A   public void warning(String format, Object... args) %7B%0A      warningsCounter++;%0A      message(%22WARNING: %22 + format, args);%0A   %7D%0A%0A   public void warning(Loc loc, String format, Object... args) %7B%0A      warning(loc + %22 %22 + format, args);%0A   %7D%0A%0A   public void fatal(String format, Object... args) %7B%0A      warningsCounter++;%0A      message(%22FATAL: %22 + format, args);%0A   %7D%0A%0A   public void fatal(Loc loc, String format, Object... args) %7B%0A      fatal(loc + %22 %22 + format, args);%0A   %7D%0A%0A   public String getSummary() %7B%0A      return %22%5Cnerrors: %22 + errorsCounter +%0A             %22%5Cnwarnings: %22 + warningsCounter +%0A             %22%5Cnfatal errors: %22 + fatalsCounter +%0A             %22%5Cn%22;%0A   %7D%0A%0A   public void summary() %7B%0A      show.accept(getSummary());%0A   %7D%0A%0A%0A%7D%0A

Add support for reporting errors