short CompTypeDeclarators(short t, Type **ptype, Symbol **psym, long storFlags) { Type *head = NULL; /* *ptype = baseType; */ if (t == TokStar) t = PointerOpt(ptype, psym, t); switch(t) { case TokLParen: /* late eval */ head = &CharType; t = CompTypeDeclarators(GetToken(), &head, psym, 0); t = SkipToken(t, TokRParen); break; case TokVarId: /* symbol */ case TokId: case TokTypeId: case TokEnumConst: *psym = LexSym; t = GetToken(); break; /* default: break; */ /* other */ } t = DirectDeclarator(ptype, psym, t, storFlags); /* * Stick head in front of ptype. Must scan head in reverse. */ if (head) ReverseFeed(ptype, head); return(t); }
Node* Parser::Declarator(Symbol *type) { Node *pointer = Pointer(); Node *decl = DirectDeclarator(type); return decl; }