}
if (!good && token!=null)
- throw new ParseFailed(ParseFailed.error(ANSI.red("unexpected character")+" "+ANSI.purple(token)+" encountered at "+ANSI.green(getLocation())+"\n", token, hash.values()),
+ throw new ParseFailed(ParseFailed.error(ANSI.red("unexpected character ")+" \'"+
+ ANSI.purple(StringUtil.escapify(token+"", "\\\'\r\n"))+
+ "\' encountered at "+
+ ANSI.green(getLocation())+"\n", token, hash.values()),
getLocation());
if (token==null && finalResult==null)
throw new ParseFailed(ParseFailed.error(ANSI.red("unexpected end of file\n"), token, hash.values()),