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(cst): correct document.valueRange.end #30

Merged
merged 3 commits into from
Aug 14, 2018

Conversation

ikatyang
Copy link
Contributor

@ikatyang ikatyang commented Aug 8, 2018

I'd like to get the position of directives end marker (---) and contents end marker (...) but it's hard to locate them from the generated CST.

This is the minimal change I can think of, hope it's acceptable.

@eemeli
Copy link
Owner

eemeli commented Aug 8, 2018

That seems like a rather radical extension of the API, for relatively little benefit. I probably won't have time to look into this for the next two weeks or so, but CST nodes have a (so far) undocumented valueRange property that might work for this; I can't recall exactly how it's determined for CSTDocument, but it's probably the { start, end }range that would be just inside the document markers. And if it's not, it should probably be fixed to be so.

@ikatyang ikatyang changed the title feat(cst): add parse events fix(cst): correct document.valueRange.end Aug 8, 2018
@eemeli eemeli merged commit 083b4c6 into eemeli:master Aug 14, 2018
@ikatyang ikatyang deleted the feat/cst/add-parse-events branch August 15, 2018 00:45
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.

2 participants