Merged in PA1

This commit is contained in:
Sanjar Ahmadov
2021-03-23 19:24:50 -04:00
187 changed files with 10820 additions and 0 deletions
@@ -7,6 +7,7 @@ import java_cup.runtime.ComplexSymbolFactory.Location;
import java.util.List;
/** Collects the error messages in a Program. There is exactly one per Program node. */
public class Errors extends Node {
@@ -26,11 +27,13 @@ public class Errors extends Node {
allowMultipleErrors = true;
}
/** Return true iff there are any errors. */
public boolean hasErrors() {
return !this.errors.isEmpty();
}
/** Prevent multiple semantic errors on the same node. */
public void suppressMultipleErrors() {
allowMultipleErrors = false;