[gobject-introspection] giscanner/scannerlexer.l: Parse and ignore more __asm and __volatile



commit 962ab98e926e886a476b76ad641c30718a0a6e84
Author: Patrick Welche <prlw1 cam ac uk>
Date:   Sat Apr 20 12:34:15 2013 +0100

    giscanner/scannerlexer.l: Parse and ignore more __asm and __volatile
    
    In the spirit of c9708af2 also parse and ignore
    
    __asm    [whitespace] volatile
    __asm__  [whitespace] volatile
    __volatile
    __volatile__
    
    Ignoring __volatile is cosmetic, but the __asm cases avoid an unwanted
    VOLATILE token. Extension of
    
    https://bugzilla.gnome.org/show_bug.cgi?id=678794

 giscanner/scannerlexer.l | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l
index 65fa3c2..f8fd370 100644
--- a/giscanner/scannerlexer.l
+++ b/giscanner/scannerlexer.l
@@ -137,6 +137,8 @@ stringtext                          ([^\\\"])|(\\.)
 ","                                    { return ','; }
 "->"                                   { return ARROW; }
 
+"__asm"[\t\f\v\r ]+"volatile"                  { if (!parse_ignored_macro()) REJECT; }
+"__asm__"[\t\f\v\r ]+"volatile"                { if (!parse_ignored_macro()) REJECT; }
 "__asm"                                { if (!parse_ignored_macro()) REJECT; }
 "__asm__"                              { if (!parse_ignored_macro()) REJECT; }
 "__attribute__"                        { if (!parse_ignored_macro()) REJECT; }
@@ -148,6 +150,8 @@ stringtext                          ([^\\\"])|(\\.)
 "__signed__"                           { return SIGNED; }
 "__restrict"                           { return RESTRICT; }
 "__typeof"                             { if (!parse_ignored_macro()) REJECT; }
+"__volatile"                           { if (!parse_ignored_macro()) REJECT; }
+"__volatile__"                         { if (!parse_ignored_macro()) REJECT; }
 "_Bool"                                        { return BOOL; }
 
 "G_GINT64_CONSTANT"                    { return INTL_CONST; }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]