static void parseClass (tokenInfo *const token) { Assert (isKeyword (token, KEYWORD_class)); readToken (token); if (isType (token, TOKEN_IDENTIFIER)) { makeEiffelClassTag (token); readToken (token); } do { if (isType (token, TOKEN_OPEN_BRACKET)) parseGeneric (token, TRUE); else if (! isType (token, TOKEN_KEYWORD)) readToken (token); else switch (token->keyword) { case KEYWORD_inherit: parseInherit (token); break; case KEYWORD_feature: parseFeatureClauses (token); break; case KEYWORD_convert: parseConvert (token); break; default: readToken (token); break; } } while (! isKeyword (token, KEYWORD_end) && ! isType (token, TOKEN_EOF)); }
static void parseClass (tokenInfo *const token) { Assert (isKeyword (token, KEYWORD_class)); readToken (token); if (isType (token, TOKEN_IDENTIFIER)) { #ifndef TYPE_REFERENCE_TOOL makeEiffelClassTag (token); readToken (token); #else vStringCopy (token->className, token->string); vStringUpper (token->className); if (PrintClass) puts (vStringValue (token->className)); if (! PrintReferences) exit (0); readToken (token); #endif } do { if (isType (token, TOKEN_OPEN_BRACKET)) parseGeneric (token, TRUE); else if (! isType (token, TOKEN_KEYWORD)) readToken (token); else switch (token->keyword) { case KEYWORD_inherit: parseInherit (token); break; case KEYWORD_feature: parseFeatureClauses (token); break; default: readToken (token); break; } } while (! isKeyword (token, KEYWORD_end)); }