gll icon indicating copy to clipboard operation
gll copied to clipboard

Document everything!

Open eddyb opened this issue 7 years ago • 2 comments

eddyb avatar Aug 21 '18 20:08 eddyb

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.

anp avatar Nov 25 '18 03:11 anp

@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.

eddyb avatar Nov 25 '18 04:11 eddyb