summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2009-12-05 22:54:43 +0200
committerStefan Kost <ensonic@users.sf.net>2009-12-05 22:54:43 +0200
commit531442faea054507f7d50e36464ea1737e2423ac (patch)
tree67869f0adaf85098cd82ef8dcb25dc9490fa3093
parent5de1b4c4f628cddd23df07f1b09e4e0be62dc941 (diff)
downloadgobject-introspection-531442faea054507f7d50e36464ea1737e2423ac.tar.gz
scanner: fix wrong linenumbers in parser errors
Increment linenumber in parse_comment which reads over multiline comments.
-rw-r--r--giscanner/scannerlexer.l3
1 files changed, 3 insertions, 0 deletions
diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l
index d78de905..cee91608 100644
--- a/giscanner/scannerlexer.l
+++ b/giscanner/scannerlexer.l
@@ -216,6 +216,9 @@ parse_comment (GISourceScanner *scanner)
{
g_string_append_c (comment, c1);
+ if (c1 == '\n')
+ lineno++;
+
c1 = c2;
c2 = input();