diff options
author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2018-12-04 00:00:00 +0000 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2018-12-08 19:19:47 +0100 |
commit | 26f17fa4970618375430784819daf3189661386b (patch) | |
tree | 6a592d7efefe48f1fac8b004d1fcbd154f8a3519 | |
parent | 051ee3973030f98729f2819e26090187b82d9ca9 (diff) | |
download | gobject-introspection-26f17fa4970618375430784819daf3189661386b.tar.gz |
scanner: Replace use of typeof with void token
This makes it possible to parse inputs where typeof is used as part of
cast expression, e.g., in g_object_ref macro expansion. Selection of
VOID is arbitrary since there is no actual implementation of typeof.
-rw-r--r-- | giscanner/scannerlexer.l | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l index 6e2796ab..971b3a73 100644 --- a/giscanner/scannerlexer.l +++ b/giscanner/scannerlexer.l @@ -177,8 +177,8 @@ stringtext ([^\\\"])|(\\.) "__restrict__" { return RESTRICT; } "thread_local" { return THREAD_LOCAL; } "_Thread_local" { return THREAD_LOCAL; } -"__typeof__" { if (!parse_ignored_macro()) REJECT; } -"__typeof" { if (!parse_ignored_macro()) REJECT; } +"__typeof__" { if (parse_ignored_macro()) return VOID; else REJECT; } +"__typeof" { if (parse_ignored_macro()) return VOID; else REJECT; } "__volatile" { return VOLATILE; } "__volatile__" { return VOLATILE; } "_Bool" { return BASIC_TYPE; } |