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

dev: better pp and inspect #2819

Merged
merged 2 commits into from
Mar 6, 2023
Merged

Conversation

flavorjones
Copy link
Member

What problem is this PR intended to solve?

Improve output of inspect and pp for some classes: AttributeDecl, ElementContent, ElementDecl, and EntityDecl

These classes were either:

  • inheriting PP::Node and overriding #inspect but not #pretty_print, or
  • not inheriting PP::Node where they could be to simplify things

Additionally, PP::Node#inspect and PP::Node#pretty_print no longer munge the names of inspected attributes (e.g., attribute_nodes appears as-is instead of as attributes), and if there is only a single inspect_attributes, we omit the key name which makes the XML declarations' output nicer.

Have you included adequate test coverage?

Err, no, but these changes should only impact debugging.

Does this change affect the behavior of either the C or the Java implementations?

N/A

AttributeDecl, ElementContent, ElementDecl, and EntityDecl
@flavorjones flavorjones changed the title Flavorjones better pp and inspect dev: better pp and inspect Mar 6, 2023
@flavorjones flavorjones merged commit a897d2d into main Mar 6, 2023
@flavorjones flavorjones deleted the flavorjones-better-pp-and-inspect branch March 6, 2023 22:33
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.

1 participant