tools.reader.edn throws on reading "(+)" from java.io.PushbackReader

Description

Repro:

This error happens when you have more than one unread in a row.

A trace of what happens when running the repro. First add some logging in reader_types:

Then run the repro:

Proposed solution
The patch prevents two successive unreads by only unreading when necessary: at the end of the token.

The trace with the patch applied:

Environment

None

Activity

Show:
Nicola Mometto
November 14, 2020, 1:56 PM

Thanks! merged

Fixed

Assignee

Unassigned

Reporter

Michiel Borkent

Labels

None

Approval

None

Patch

Code and Test

Priority

Major