Changeset 263 for trunk/idl-compiler/parser_c
- Timestamp:
- Mar 24, 2007, 5:18:50 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/idl-compiler/parser_c/method_parser.c
r259 r263 42 42 extern PINTERFACE pCurInterface; 43 43 44 /* In override_parser.c */ 45 extern PINTERFACE findInterfaceForMethod(PINTERFACE pStartInterface, gchar* chrMethodName); 46 44 47 static PMETHOD createMethodStruct() 45 48 { … … 146 149 GTokenValue value; 147 150 PMETHOD pMethod=createMethodStruct(); 148 151 PINTERFACE pif; 149 152 //g_printf("%d: ", __LINE__); 150 153 //printToken(curToken); … … 157 160 { 158 161 getNextToken(); /* Make sure error references the correct token */ 159 printToken(curToken);160 162 g_scanner_unexp_token(gScanner, 161 163 G_TOKEN_IDENTIFIER, … … 169 171 value=gScanner->value; 170 172 pMethod->chrName=g_strdup(value.v_identifier); 173 174 /* Now check if the method was introduced by some parent */ 175 if((pif=findInterfaceForMethod(pCurInterface, pMethod->chrName))!=NULL) 176 { 177 gchar* chrMessage; 178 chrMessage=g_strdup_printf("A method '%s' is already present in interface '%s'.", 179 pMethod->chrName, pif->chrName); 180 181 g_scanner_unexp_token(gScanner, 182 G_TOKEN_IDENTIFIER, 183 NULL, 184 NULL, 185 NULL, 186 chrMessage, 187 TRUE); /* is_error */ 188 exit(1); 189 } 171 190 172 191 /* Handle parameters if any */
Note:
See TracChangeset
for help on using the changeset viewer.