protected static void badAssign(Expr expr) throws CompileError { String msg; if (expr == null) msg = "incompatible type for assignment"; else msg = "incompatible type for " + expr.getName(); throw new CompileError(msg); }
protected static void badType(Expr expr) throws CompileError { throw new CompileError("invalid type for " + expr.getName()); }