[gobject-introspection] scanner: fix wrong linenumbers in parser errors



commit 531442faea054507f7d50e36464ea1737e2423ac
Author: Stefan Kost <ensonic users sf net>
Date:   Sat Dec 5 22:54:43 2009 +0200

    scanner: fix wrong linenumbers in parser errors
    
    Increment linenumber in parse_comment which reads over multiline comments.

 giscanner/scannerlexer.l |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l
index d78de90..cee9160 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();
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]