diff options
author | Colin Walters <walters@src.gnome.org> | 2008-10-21 21:35:35 +0000 |
---|---|---|
committer | Colin Walters <walters@src.gnome.org> | 2008-10-21 21:35:35 +0000 |
commit | 8d84351392cfbc29032b8772b22023e1d829004a (patch) | |
tree | 2888d14b05c6599aa8e0f8c6c5ee24025433637a /giscanner/scannerlexer.l | |
parent | 03543f1d9b6f1db4720136c47b8a79cb88a8d2a6 (diff) | |
download | gobject-introspection-8d84351392cfbc29032b8772b22023e1d829004a.tar.gz |
Don't require trailing whitespace after uncommented parameters
svn path=/trunk/; revision=779
Diffstat (limited to 'giscanner/scannerlexer.l')
-rw-r--r-- | giscanner/scannerlexer.l | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l index 5a53cfcc..9a1daf6a 100644 --- a/giscanner/scannerlexer.l +++ b/giscanner/scannerlexer.l @@ -228,9 +228,15 @@ parse_gtkdoc (GISourceScanner *scanner, if (!isline) return; + /* Ignore lines that don't have a : - this is a hack but avoids + * trying to parse too many things as annotations + */ + if (!strchr (line, ':')) + return; + line[i] = '\0'; - parts = g_strsplit (line, ": ", 3); + parts = g_strsplit (line, ":", 3); n_parts = g_strv_length (parts); if (g_ascii_strcasecmp (parts[0], "eprecated") == 0) @@ -295,11 +301,10 @@ parse_gtkdoc (GISourceScanner *scanner, directive = gi_source_directive_new (rname, value, options); directives = g_hash_table_lookup (scanner->directives_map, symbol); directives = g_slist_prepend (directives, directive); - g_hash_table_replace (scanner->directives_map, + g_hash_table_replace (scanner->directives_map, g_strdup (symbol), directives); g_strfreev (parts); - } |