예제 #1
0
파일: symtab.c 프로젝트: 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;
}
예제 #2
0
파일: check.c 프로젝트: yubo/compilers
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;
}