(TypeEnv tenv)
| 95 | TypeInfo type; |
| 96 | public BlockEx(List<ASTree> c) { super(c); } |
| 97 | public TypeInfo typeCheck(TypeEnv tenv) throws TypeException { |
| 98 | type = TypeInfo.INT; |
| 99 | for (ASTree t: this) |
| 100 | if (!(t instanceof NullStmnt)) |
| 101 | type = ((ASTreeTypeEx)t).typeCheck(tenv); |
| 102 | return type; |
| 103 | } |
| 104 | } |
| 105 | @Reviser public static class IfEx extends IfStmnt { |
| 106 | public IfEx(List<ASTree> c) { super(c); } |