diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-04-07 12:26:47 -0600 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-04-07 12:26:47 -0600 |
commit | 1ec847c7222b8adb9a70264c98a44dc9911d65d3 (patch) | |
tree | ed8d2601bc14079bb39c7af0f0c6533875b48b2c /Typecheck.java | |
parent | 9cd3df6ff58e3999a049f97a0acaaf997a01fec8 (diff) |
More bugfixes in ST, changes to scoping
Diffstat (limited to 'Typecheck.java')
-rw-r--r-- | Typecheck.java | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Typecheck.java b/Typecheck.java index 4c43709..b4149d9 100644 --- a/Typecheck.java +++ b/Typecheck.java @@ -26,18 +26,18 @@ public class Typecheck { root.accept(new SymTableTopDown<Void>(), symt); PrintFilter.print("===================================================", true); - TypeCheckSimp ts = new TypeCheckSimp(); - TypeInstance res = root.accept(ts, symt); + // TypeCheckSimp ts = new TypeCheckSimp(); + // TypeInstance res = root.accept(ts, symt); - // Ugly code not to be inspired from: "my" way of storing - // type info / typecheck property: if some of my internal - // structure is empty, then things don't typecheck for - // me. This is specific to my own implementation. - // if (res != null && res.type_array.size() > 0) - if (res.getType() != TypeEnum.ERROR) - System.out.println("Program type checked successfully"); - else - System.out.println("Type error"); + // // Ugly code not to be inspired from: "my" way of storing + // // type info / typecheck property: if some of my internal + // // structure is empty, then things don't typecheck for + // // me. This is specific to my own implementation. + // // if (res != null && res.type_array.size() > 0) + // if (res.getType() != TypeEnum.ERROR) + // System.out.println("Program type checked successfully"); + // else + // System.out.println("Type error"); } catch (ParseException e) { System.out.println(e.toString()); |