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 {
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'";
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";