static boolean parseFeature (tokenInfo *const token) { boolean found = FALSE; while (readFeatureName (token)) { found = TRUE; #ifndef TYPE_REFERENCE_TOOL makeEiffelFeatureTag (token); #endif readToken (token); if (isType (token, TOKEN_COMMA)) readToken (token); } if (found) { if (isType (token, TOKEN_OPEN_PAREN)) /* arguments? */ parseArguments (token); if (isType (token, TOKEN_COLON)) /* a query? */ parseEntityType (token); if (isKeyword (token, KEYWORD_obsolete)) { readToken (token); if (isType (token, TOKEN_STRING)) readToken (token); } if (isKeyword (token, KEYWORD_is)) findFeatureEnd (token); } return found; }
static void parseRename (tokenInfo *const token) { Assert (isKeyword (token, KEYWORD_rename)); do { readToken (token); if (readFeatureName (token)) { readToken (token); if (isKeyword (token, KEYWORD_as)) { readToken (token); if (readFeatureName (token)) { makeEiffelFeatureTag (token); /* renamed feature */ readToken (token); } } } } while (isType (token, TOKEN_COMMA)); }
static void parseRename (tokenInfo *const token) { do { readToken (token); if (readFeatureName (token)) { readToken (token); if (isKeyword (token, KEYWORD_as)) { readToken (token); if (readFeatureName (token)) { #ifndef TYPE_REFERENCE_TOOL makeEiffelFeatureTag (token); /* renamed feature */ #endif readToken (token); } } } } while (isType (token, TOKEN_COMMA)); findKeyword (token, KEYWORD_end); readToken (token); }