yeslogic/fathom

Provide a way to specify how decoded binary data should be rendered

brendanzab opened this issue · 2 comments

I'm not sure the best approach to this, but it would be really useful to be able to configure how formats are rendered for the purposes of the CLI or other tooling.

I think we might be able to include this information in the format descriptions? And then when decoding this can be added as a hint in the resulting decoded terms, like described in #328.

If we had a way to apply optional parameters to format you could imagine allowing something like:

u32be (default_display = ascii)

Another option could be adding some sort of ‘attributes’ or metadata to terms. Perhaps something like:

@[default_display = "ascii"] u32be