throw error("Was expecting '" + value + "'(" + key + ")");
}
}
protected RuntimeException error(String msg) {
Token where = token == null ? lexer.peek(1) : token;
System.err.println("error "+token);
throw new RuntimeException(msg + " (line " + where.row +
")" + "\n" + lexer.getCurrentLine() + "\n" + indent(where.col - 1) + "^\n+token="+token);
}