summaryrefslogtreecommitdiff
path: root/giscanner/scannerlexer.l
diff options
context:
space:
mode:
authorColin Walters <walters@src.gnome.org>2008-10-21 21:35:35 +0000
committerColin Walters <walters@src.gnome.org>2008-10-21 21:35:35 +0000
commit8d84351392cfbc29032b8772b22023e1d829004a (patch)
tree2888d14b05c6599aa8e0f8c6c5ee24025433637a /giscanner/scannerlexer.l
parent03543f1d9b6f1db4720136c47b8a79cb88a8d2a6 (diff)
downloadgobject-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.l11
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);
-
}