]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
genie: Amend text of indent and dedent for error messages
authorAlistair Thomas <astavale@yahoo.co.uk>
Sat, 25 Apr 2015 17:55:33 +0000 (18:55 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 3 Nov 2021 17:51:38 +0000 (18:51 +0100)
Fixes https://gitlab.gnome.org/GNOME/vala/issues/497

vala/valagenieparser.vala
vala/valagenietokentype.vala

index aacbacecadbaf174a962becf3a6cad741b9db020..92a92be651f426eefd42f53a502568bd204f6c80 100644 (file)
@@ -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 {
index 6bde090b6fda247d852a31ae28955b0d5b42fcab..55dbcc919988108d946b9c1a304eb8879e70b146 100644 (file)
@@ -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";