Conforming with the new Code API

This commit is contained in:
Pierre Pronchery 2008-06-03 09:39:16 +00:00
parent 0fe6704377
commit eb4075fed7

View File

@ -88,7 +88,7 @@ int scan(C99 * c99)
} }
c = string[0]; c = string[0];
if(isalpha(c) || c == '_') if(isalpha(c) || c == '_')
token_set_code(c99->token, code_is_type(c99->code, string) token_set_code(c99->token, code_type_get(c99->code, string) >= 0
? C99_CODE_TYPEDEF_NAME : C99_CODE_IDENTIFIER); ? C99_CODE_TYPEDEF_NAME : C99_CODE_IDENTIFIER);
else if(isdigit(c)) /* FIXME make a stricter check? */ else if(isdigit(c)) /* FIXME make a stricter check? */
token_set_code(c99->token, C99_CODE_CONSTANT); token_set_code(c99->token, C99_CODE_CONSTANT);