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 d78de905a9b938720827c41b643d24c1d217f524..cee9160879c9c71e6f3893ffb2a47ef431e56841 100644 (file)
@@ -216,6 +216,9 @@ parse_comment (GISourceScanner *scanner)
     {
       g_string_append_c (comment, c1);
 
+      if (c1 == '\n')
+        lineno++;
+
       c1 = c2;
       c2 = input();