@@ -200,7 +200,7 @@ struct token *typename(struct token *, struct symbol **, int *);
static inline int lookup_type(struct token *token)
{
- if (token->pos.type == TOKEN_IDENT) {
+ if (token_type(token) == TOKEN_IDENT) {
struct symbol *sym = lookup_symbol(token->ident, NS_SYMBOL | NS_TYPEDEF);
return sym && (sym->namespace & NS_TYPEDEF);
}
@@ -205,12 +205,12 @@ extern struct token *preprocess(struct token *);
static inline int match_op(struct token *token, int op)
{
- return token->pos.type == TOKEN_SPECIAL && token->special == op;
+ return token_type(token) == TOKEN_SPECIAL && token->special == op;
}
static inline int match_ident(struct token *token, struct ident *id)
{
- return token->pos.type == TOKEN_IDENT && token->ident == id;
+ return token_type(token) == TOKEN_IDENT && token->ident == id;
}
#endif
Unify usage of `token_type'. Signed-off-by: Jan Pokorny <pokorny_jan@seznam.cz> --- expression.h | 2 +- token.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)