[vala/staging] genie: Amend text of indent and dedent for error messages
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] genie: Amend text of indent and dedent for error messages
- Date: Thu, 4 Nov 2021 12:26:56 +0000 (UTC)
commit 7eed6c77ff8731981c6f3cfe5e3ae5c969d8523e
Author: Alistair Thomas <astavale yahoo co uk>
Date: Sat Apr 25 18:55:33 2015 +0100
genie: Amend text of indent and dedent for error messages
Fixes https://gitlab.gnome.org/GNOME/vala/issues/497
vala/valagenieparser.vala | 2 +-
vala/valagenietokentype.vala | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/vala/valagenieparser.vala b/vala/valagenieparser.vala
index aacbaceca..92a92be65 100644
--- a/vala/valagenieparser.vala
+++ b/vala/valagenieparser.vala
@@ -2476,7 +2476,7 @@ public class Vala.Genie.Parser : CodeVisitor {
TokenType cur = current ();
TokenType pre = tokens[index-1].type;
- throw new ParseError.SYNTAX ("expected declaration but got %s with previous %s",
cur.to_string (), pre.to_string());
+ throw new ParseError.SYNTAX ("expected a declaration after %s, but got %s", pre.to_string (),
cur.to_string());
}
void parse_declarations (Symbol parent, bool root = false) throws ParseError {
diff --git a/vala/valagenietokentype.vala b/vala/valagenietokentype.vala
index 6bde090b6..55dbcc919 100644
--- a/vala/valagenietokentype.vala
+++ b/vala/valagenietokentype.vala
@@ -205,7 +205,7 @@ public enum Vala.Genie.TokenType {
case CONST: return "`const'";
case CONSTRUCT: return "`construct'";
case CONTINUE: return "`continue'";
- case DEDENT: return "`dedent'";
+ case DEDENT: return "end of block (dedent)";
case DEF: return "`def'";
case DEFAULT: return "`default'";
case DELEGATE: return "`delegate'";
@@ -236,7 +236,7 @@ public enum Vala.Genie.TokenType {
case IF: return "`if'";
case IMPLEMENTS: return "`implements'";
case IN: return "`in'";
- case INDENT: return "`tab indent'";
+ case INDENT: return "block (indent)";
case INIT: return "`init'";
case INLINE: return "`inline'";
case INTEGER_LITERAL: return "integer literal";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]