Example #1
0
File: symtab.c Project: amr-vub/TC
SYM_ENTRY*
symtab_find(SYM_TAB *st,char *name)
{
	SYM_ENTRY	*i;

	for ( ; (st); st = st->parent)
		if ((i=symtab_list_find(st->list,name)))
			return i;
	return 0;
}
Example #2
0
T_INFO*
check_record_access(T_INFO* t,char* field)
{
SYM_INFO	*i;

if (t->cons!=record_t)
	error("not a record: ",0,t," for field ",field,0);
if ((i=symtab_list_find(t->info.record.fields,field)))
	return i->type;
error("record type ",0,t," has no field ",field,0);
return 0;
}