-
Notifications
You must be signed in to change notification settings - Fork 23
Clarify edge cases when parse_ion encounters something that looks like a system value #365
Copy link
Copy link
Open
Labels
Description
The parse_ion macro must always produce user values, but there are some edge cases to work out.
parse_iondoesn'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_ionreader does not perform the step of removing$ion_literalfrom the expanded values so anything that is annotated with$ion_literalin the embedded document will also be annotated with$ion_literalin the expansion. However, this is subtly different because it means that$ion_literal::1will be passed through the expansion as-is, whereas if we say that theparse_ionexpansion annotates anything that looks like a system value, then it would be read as1and put into the expansion output as1. - This may lead to unexpected behavior, depending on the resolution of Document
$ion_literaland work out edge cases. #322. Ifparse_ionis invoked in a container, will the user expect to see$ion_literalannotations in the result?
The questions that need to be answered are:
- Can we define
parse_ionsuch that it just passes through all$ion_literalannotations? (Instead of having to determine whether a value looks like a system value)? - Can Document
$ion_literaland work out edge cases. #322 be resolved in a way such that$ion_literalto be treated the same at any depth—not just at the top level?
Reactions are currently unavailable