-
Notifications
You must be signed in to change notification settings - Fork 37
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
Additional Documentation and Examples #136
Comments
@zachriggle Finally spinning back up on this project. Thank you for opening this issue!
I think you should be able to actually... more documentation on working with this would definitely be useful.
Definitely doable! I'll work on better documentation for this this week. |
It would be great if PFP had more documentation and examples about how to use it.
Consider:
There doesn't appear to be any documentation on how to interact with the
dom
object and introspect. All I can do is iterate through it, and even that's not clear on the types I'm iterating through.dir()
and__dict__
and other means of introspection don't show any useful fields with which data can be extracted.It would be nice to be able to print something out like the names of the fields, and possibly have access to whatever field the length came from. For example, something like:
Separately, it would be nice to be able to introspect into the compiled template and iterate over the structures / data types without providing exemplar data. Clearly this won't work when there are control-flow statements and conditionally-declared data types, but for plain lists of structs / fields / fields-with-variable-length, this should be possible.
Ultimately I want to use PFP to automatically generate ASCII diagrams from structure definitions, so I need access to the struct/field name, size, and a reference to the corresponding e.g. length field for a variable-width array.
The text was updated successfully, but these errors were encountered: