]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Use some replacement for an unavailable identifier string e2104cd8c740cef9c614d4c26c780cad68682c5f
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 18 Jan 2020 19:03:37 +0000 (20:03 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 3 Feb 2020 12:33:40 +0000 (13:33 +0100)
vala/valaparser.vala

index 18a636b35afc2f26943db234d2e4201f92b1aa80..2b480ce599a4d9363e3abe4c6a93ce16d70a889c 100644 (file)
@@ -146,6 +146,11 @@ public class Vala.Parser : CodeVisitor {
                return tokens[index].begin;
        }
 
+       string get_location_string () {
+               var begin = get_location ();
+               return "__VALA_L%d_C%d__".printf (begin.line, begin.column);
+       }
+
        string get_current_string () {
                var token = tokens[index];
                return ((string) token.begin.pos).substring (0, (int) (token.end.pos - token.begin.pos));
@@ -287,7 +292,7 @@ public class Vala.Parser : CodeVisitor {
                        if (context.keep_going) {
                                report_parse_error (e);
                                prev ();
-                               return "";
+                               return get_location_string ();
                        } else {
                                throw e;
                        }