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

Clarify edge cases when parse_ion encounters something that looks like a system value #365

Open
popematt opened this issue Nov 13, 2024 · 0 comments
Labels
documentation specification 1.1 Ion 1.1 specification work

Comments

@popematt
Copy link
Contributor

The parse_ion macro must always produce user values, but there are some edge cases to work out.

  • parse_ion doesn't (and shouldn't) know at what depth it was invoked, so anything in its output that looks like a system value must be annotated with $ion_literal
  • practically speaking, it might be easier to say that the parse_ion reader does not perform the step of removing $ion_literal from the expanded values so anything that is annotated with $ion_literal in the embedded document will also be annotated with $ion_literal in the expansion. However, this is subtly different because it means that $ion_literal::1 will be passed through the expansion as-is, whereas if we say that the parse_ion expansion annotates anything that looks like a system value, then it would be read as 1 and put into the expansion output as 1.
  • This may lead to unexpected behavior, depending on the resolution of Document $ion_literal and work out edge cases. #322. If parse_ion is invoked in a container, will the user expect to see $ion_literal annotations in the result?

The questions that need to be answered are:

  • Can we define parse_ion such that it just passes through all $ion_literal annotations? (Instead of having to determine whether a value looks like a system value)?
  • Can Document $ion_literal and work out edge cases. #322 be resolved in a way such that $ion_literal to be treated the same at any depth—not just at the top level?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation specification 1.1 Ion 1.1 specification work
Projects
None yet
Development

No branches or pull requests

1 participant