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

Document everything! #19

Open
eddyb opened this Issue Aug 21, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@eddyb
Copy link
Member

eddyb commented Aug 21, 2018

No description provided.

@anp

This comment has been minimized.

Copy link
Member

anp commented Nov 25, 2018

From my usage so far, the most impactful documentation to add would be around the use of the Handle type to access parse results. The generated structs are pretty self-explanatory other than the indirection in that type (aside: why not impl Deref or similar?).

I'm currently using one() for structs with members and source()/source_info() for parsed spans. If I'm doing it wrong then it would be great to document what I should do instead :D.

@eddyb

This comment has been minimized.

Copy link
Member Author

eddyb commented Nov 25, 2018

@anp It's hard to figure out where and how to document generated code.
But also, Deref is impossible because the information is obtained on the fly.

I am planning to experiment with #73 soon, and that should allow a more convenient interaction with the parse tree, where we can have nice examples.

In truth, the Handle API is a low-level primitive for lazy parse tree traversal and should not be the user-facing focus of an ergonomic parsing framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.