-
Notifications
You must be signed in to change notification settings - Fork 14
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
Make VariablyOccurringTypeArgument compatible with TypeArgument #283
Comments
As long as you are referring to substituting data class OrderedElements(val types: List<VariablyOccurringTypeArgument>) : Constraint {
constructor(types: List<TypeArgument>):
this(types.map { VariablyOccurringTypeArgument(OCCURS_REQUIRED, it) })
} |
I think that is useful but it doesn't solve my problem. But now I see the issue with what I want. I want to store It seems like this should be allowed by the BNF. For now I have wrapped
I am still experimenting for now. |
Thanks for providing more details about your use case.
This is particularly interesting to me. Can you explain more about why you want to do this? Do you have some
I agree that it does seem that way, but the BNF is specifically for describing the ISL syntax. When it comes to modeling Ion Schema, neither a I think there are at least two ways we could improve this. One would be to create a builder/DSL for the model that looks more like ISL syntax. (This is something that I would like to do regardless, but I haven't had the opportunity yet because it's been a lower priority than some of our other work.) The second you have already mentioned—we can introduce a union type that is able to hold either a |
In the Ion Schema 2.0 definition Variably Occurring Type Arguments are defined as
Based on this, it would be useful to be able to substitute
TypeArgument
any place aVariablyOccurringTypeArgument
is required or at least be able to construct aVariablyOccurringTypeArgument
without passingoccurs
, which will use the default for the givenTypeArgument
.The text was updated successfully, but these errors were encountered: