From: Alistair Thomas Date: Sat, 25 Apr 2015 17:55:33 +0000 (+0100) Subject: genie: Amend text of indent and dedent for error messages X-Git-Tag: 0.55.1~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7eed6c77ff8731981c6f3cfe5e3ae5c969d8523e;p=thirdparty%2Fvala.git genie: Amend text of indent and dedent for error messages Fixes https://gitlab.gnome.org/GNOME/vala/issues/497 --- 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";