public void setSymtab(Symtab st) {
		if (!Utils.isValidType(type.toString(), st) && !type.toString().equals("void"))
			Main.error("invalid type (" + type.toString() + ")");
		boolean hasReturn = statement_list.hasReturn();
		if (!type.toString().equals("void")) {
			if (!hasReturn)
				Main.error("Function " + id
						+ " must contain a return statement");
		} else if (hasReturn)
			Main.error("Function " + id + " cannot contain a return statement");
		Symtab functionTable = new Symtab();
		args = arg_list.getArgs(args);
		int j = 0;
		if (args.size() != 0)
			for (int i = args.size() - 1; i > -1; i--) {
				functionTable.enter("p" + j,
						new SymtabEntry("p" + j, args.get(i)));
				j++;
			}
		st.enter(id.toString(), new SymtabEntry(id.toString(), "function<"
				+ type.toString() + ">", functionTable));
		arg_list.setScope(id.toString());
		arg_list.setSymtab(st);
		statement_list.setScope(id.toString());
		statement_list.setSymtab(st);
	}