scanner: fix wrong linenumbers in parser errors
authorStefan Kost <ensonic@users.sf.net>
Sat, 5 Dec 2009 20:54:43 +0000 (22:54 +0200)
committerStefan Kost <ensonic@users.sf.net>
Sat, 5 Dec 2009 20:54:43 +0000 (22:54 +0200)
Increment linenumber in parse_comment which reads over multiline comments.

giscanner/scannerlexer.l

index d78de90..cee9160 100644 (file)
@@ -216,6 +216,9 @@ parse_comment (GISourceScanner *scanner)
     {
       g_string_append_c (comment, c1);
 
+      if (c1 == '\n')
+        lineno++;
+
       c1 = c2;
       c2 = input();