2008-09-07 Johan Dahlin <johan@gnome.org>
Bug 551162 – giscanner does not recognize asm and __asm__
* giscanner/scannerlexer.l:
Patch by Jani Monoses.
svn path=/trunk/; revision=577
+2008-09-07 Johan Dahlin <johan@gnome.org>
+
+ Bug 551162 – giscanner does not recognize asm and __asm__
+ * giscanner/scannerlexer.l:
+ Patch by Jani Monoses.
+
2008-09-06 Colin Walters <walters@verbum.org>
* girepository/girnode.c: Allow gtype_name
[a-zA-Z_][a-zA-Z_0-9]* { if (scanner->macro_scan) return IDENTIFIER; else REJECT; }
+"asm" { if (!parse_ignored_macro()) REJECT; }
+"__asm__" { if (!parse_ignored_macro()) REJECT; }
"auto" { return AUTO; }
"_Bool" { return BOOL; }
"break" { return BREAK; }
/*
* This parses a macro which is ignored, such as
- * __attribute__(x)
+ * __attribute__((x)) or __asm__ (x)
*/
static int
parse_ignored_macro (void)
int c;
int nest;
- while ((c = input ()) != EOF && isspace (c))
- ;
- if (c != '(')
- return FALSE;
while ((c = input ()) != EOF && isspace (c))
;
if (c != '(')
lineno++;
}
- while ((c = input ()) != EOF && isspace (c))
- ;
- if (c != ')')
- return FALSE;
-
return TRUE;
}