riddl
riddl copied to clipboard
Support In-place Prettify
Allow individual files to be prettified. This requires the definitional context to be provided as a parameter. That is, a top level fill can be included with "Root" level parsing while a file included into a "Domain" needs that level of context in order to know how to parse it.
With that support, it then becomes possible to:
- parse the input file correctly
- validate it by providing the top level context artificial
- write out a candidate replacement file
- parse & validate that replacement file
- remove the old file and rename the new files to have prettified a single file.