diff options
author | Alban Browaeys <prahal@yahoo.com> | 2012-06-28 18:34:02 +0200 |
---|---|---|
committer | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2012-08-03 13:57:11 +0200 |
commit | beb5c820139693c85f4e5277a7c430dd6042fbcb (patch) | |
tree | dec4ff90163f46aa8afaa22d0356609cde3f8dfa /giscanner/scannerlexer.l | |
parent | d0ffee9bffacbeb45cc4e03079fe143d5f73288d (diff) | |
download | gobject-introspection-beb5c820139693c85f4e5277a7c430dd6042fbcb.tar.gz |
giscanner: special case G_GINT64_CONSTANT and G_GUINT64_CONSTANT + misc
This let the macro expands to its value as gint64/guint64.
Also
- fix lexer identifier/typdef detection for macro and misc
- do not discard cast
Diffstat (limited to 'giscanner/scannerlexer.l')
-rw-r--r-- | giscanner/scannerlexer.l | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l index 8ff6b7be..a783ec06 100644 --- a/giscanner/scannerlexer.l +++ b/giscanner/scannerlexer.l @@ -147,7 +147,9 @@ stringtext ([^\\\"])|(\\.) "__typeof" { if (!parse_ignored_macro()) REJECT; } "_Bool" { return BOOL; } -[a-zA-Z_][a-zA-Z_0-9]* { if (scanner->macro_scan) return IDENTIFIER; else REJECT; } +"G_GINT64_CONSTANT" { return INTL_CONST; } +"G_GUINT64_CONSTANT" { return INTUL_CONST; } +[a-zA-Z_][a-zA-Z_0-9]* { if (scanner->macro_scan) return check_identifier(scanner, yytext); else REJECT; } "asm" { if (!parse_ignored_macro()) REJECT; } "auto" { return AUTO; } |