[vala/staging] vala: Use some replacement for an unavailable identifier string
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] vala: Use some replacement for an unavailable identifier string
- Date: Mon, 3 Feb 2020 12:35:18 +0000 (UTC)
commit e2104cd8c740cef9c614d4c26c780cad68682c5f
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Jan 18 20:03:37 2020 +0100
vala: Use some replacement for an unavailable identifier string
vala/valaparser.vala | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/vala/valaparser.vala b/vala/valaparser.vala
index 18a636b35..2b480ce59 100644
--- a/vala/valaparser.vala
+++ b/vala/valaparser.vala
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]