mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 20:07:17 +00:00
widl: Introduce a new helper to produce num tokens.
This commit is contained in:
parent
a46facfd8c
commit
baa3680f2e
|
@ -131,6 +131,12 @@ struct uuid *parse_uuid(const char *u)
|
|||
return uuid;
|
||||
}
|
||||
|
||||
static int token_num( int token, const char *yytext, YYSTYPE *yylval )
|
||||
{
|
||||
yylval->num = xstrtoul( yytext, NULL, 0 );
|
||||
return token;
|
||||
}
|
||||
|
||||
%}
|
||||
|
||||
/*
|
||||
|
@ -227,14 +233,8 @@ SAFEARRAY{ws}*/\( return tSAFEARRAY;
|
|||
^{ws}*\#{ws}* { yy_push_state(PP_LINE); }
|
||||
\[ { yy_push_state(ATTR); return '['; }
|
||||
|
||||
{hex} {
|
||||
yylval->num = xstrtoul(yytext, NULL, 0);
|
||||
return aHEXNUM;
|
||||
}
|
||||
{int} {
|
||||
yylval->num = xstrtoul(yytext, NULL, 0);
|
||||
return aNUM;
|
||||
}
|
||||
{hex} { return token_num( aHEXNUM, yytext, yylval ); }
|
||||
{int} { return token_num( aNUM, yytext, yylval ); }
|
||||
|
||||
\n { line_number++; }
|
||||
{ws} {}
|
||||
|
|
Loading…
Reference in a new issue