Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues with readtables #452

Closed
wants to merge 3 commits into from
Closed

Conversation

ricochet1k
Copy link

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 like reader.getLocation() instead of just reader.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.

@ricochet1k ricochet1k changed the title PARTIAL: Fix issues with readtables Fix issues with readtables Feb 7, 2015
@disnet
Copy link
Member

disnet commented Mar 28, 2016

Closing because this is probably obviated with the release of 1.0.

@disnet disnet closed this Mar 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants