From 61a28b7f8e709d1884ccab15f0dc38ed19dfde70 Mon Sep 17 00:00:00 2001 From: bd-912 Date: Tue, 9 Apr 2024 23:48:26 -0600 Subject: Partial arguments in Vaporize.MessageSend, Typecheck for milestone --- Typecheck.java | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'Typecheck.java') diff --git a/Typecheck.java b/Typecheck.java index b4149d9..4c43709 100644 --- a/Typecheck.java +++ b/Typecheck.java @@ -26,18 +26,18 @@ public class Typecheck { root.accept(new SymTableTopDown(), 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()); -- cgit v1.2.3