public void checkType(Symtab st) {
		if (!Utils.isValidType(type.toString(), st))
			Main.error("invalid type (" + type.toString() + ")");
		boolean isNew = st.enter(ident1.toString(), new SymtabEntry(ident1.toString(), type.toString(), scope));
		if (!isNew)
			Main.error("Identifier " + ident1 + " defined twice in function " + scope);
		ident2.setScope(scope);
		ident2.checkcontext(st);
		SymtabEntry listEntry = st.lookup(ident2.toString());
		String listType = listEntry.getType();
		if (!listType.startsWith("list"))
			Main.error(ident2.toString() + "is not a list");
		listType = Utils.getListType(listType);
		if (!listType.equals(type.toString()))
			Main.error("the type of " + ident1.toString() + " does not match the type of list " + ident2.toString());
		statement_list.setScope(scope);
		statement_list.setSymtab(st);
	}