Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've been making modifications to the jsx-reader project and I have been finding lots of problems with readtables, especially when they are nested in tokens read by other readtable extensions. I think I found the solution to one problem, but there are still other things going on.
The fix commit will make the startRange and endRange lines work, but the last expect is still broken. The parser is not able to parse its own output?
Another issue is "Invalid mapping" errors when generating sourceMaps, with a negative column number:
"original":{"line":194,"column":-91}
. It comes from generating tokens with a {start:} that is earlier than the reader's current line. There doesn't appear to be a better way to record the source location. Ideally one could pass in a token, or get a more complete location state from the reader, something likereader.getLocation()
instead of justreader.index
. I am not sure what an appropriate fix would be.What is the best way to move forward with this? Readtables are a great feature, but the weak API is difficult to work with.