summaryrefslogtreecommitdiff
path: root/giscanner/scannerlexer.l
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2008-12-09 00:07:08 +0000
committerJohan Dahlin <johan@src.gnome.org>2008-12-09 00:07:08 +0000
commitc1eb0a1670b41ffaa254310284a025ddc25c11a1 (patch)
tree559da38d33d7d84a649f39d3b9f6625d239846b4 /giscanner/scannerlexer.l
parent076bf783f0a4e1362f08cbc2dd986f85a8afaf5f (diff)
downloadgobject-introspection-c1eb0a1670b41ffaa254310284a025ddc25c11a1.tar.gz
Bug 563742 – introspection should record the introduced version of
2008-12-08 Tristan Van Berkom <tristan.van.berkom@gmail.com> Bug 563742 – introspection should record the introduced version of symbols marked with the "Since:" tag reviewed by: Johan * giscanner/ast.py: * giscanner/girwriter.py: * giscanner/scannerlexer.l: * giscanner/transformer.py: * tests/scanner/annotation-1.0-expected.gir: * tests/scanner/annotation-1.0-expected.tgir: * tests/scanner/annotation.c (annotation_versioned): * tests/scanner/annotation.h: svn path=/trunk/; revision=988
Diffstat (limited to 'giscanner/scannerlexer.l')
-rw-r--r--giscanner/scannerlexer.l13
1 files changed, 12 insertions, 1 deletions
diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l
index 22894d18..27072cd4 100644
--- a/giscanner/scannerlexer.l
+++ b/giscanner/scannerlexer.l
@@ -261,6 +261,15 @@ parse_gtkdoc (GISourceScanner *scanner,
name = parts[0];
value = NULL;
}
+ else if (g_ascii_strcasecmp (parts[0], "ince") == 0)
+ {
+ if (n_parts == 2)
+ options = g_slist_prepend (options, g_strdup (parts[1]));
+ else
+ options = g_slist_prepend (options, g_strdup (""));
+ name = parts[0];
+ value = NULL;
+ }
else if (n_parts >= 2)
{
name = parts[0];
@@ -306,6 +315,8 @@ parse_gtkdoc (GISourceScanner *scanner,
rname = "return";
else if (g_ascii_strncasecmp ("eprecated", name, 9) == 0)
rname = "deprecated";
+ else if (g_ascii_strncasecmp ("ince", name, 4) == 0)
+ rname = "since";
else
rname = name;
@@ -358,7 +369,7 @@ parse_comment (GISourceScanner *scanner)
if ((c1 != '*' && c1 != ' '))
startofline = FALSE;
- if (startofline && (c1 == ' ') && (c2 == '@' || (c2 == 'r') || (c2 == 'R') || (c2 == 'D')))
+ if (startofline && (c1 == ' ') && ((c2 == '@') || (c2 == 'r') || (c2 == 'R') || (c2 == 'D') || (c2 == 'S')))
{
c1 = c2;
c2 = input();