public Type type_check(Table<Type> t_env,Table<Dec> v_env,boolean in_loop,ErrorList e){
		/* 1.add a new scope for sym */
		Dec_var dv = new Dec_var(line,column,sym,e1,null);
		the_index = dv;
		dv.the_type = Type.THE_INT;
		
		v_env = v_env.beginScope();
		v_env.put(sym, dv);
		/* 2.check the range expr,which should be int */
		Type num_type = e1.type_check(t_env, v_env, false, e);
		if(!(num_type.actual() instanceof INT)){
			e.add_error("Type of for range should be integer", e1.line, e1.column, "typing");
		}
		num_type = e2.type_check(t_env, v_env, false, e);
		if(!(num_type.actual() instanceof INT)){
			e.add_error("Type of for range should be integer", e2.line, e2.column, "typing");
		}
		/* 3.check loop body,which must be void */
		Type loop_type = e3.type_check(t_env, v_env, true, e);
		if(!(loop_type.actual() instanceof VOID)){
			e.add_error("Type of for body should be void", e3.line, e3.column, "typing");
		}
		/* 4.close env */
		v_env = v_env.endScope();
		
		the_type = Type.THE_VOID;
		return the_type;
	}