-
Notifications
You must be signed in to change notification settings - Fork 74
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
JSON: retain original order of map entries? #1630
Comments
Yeah, an optional meta trait is gonna be the way to go, but this goes in with the question of abstracting over As for the problem at hand, I think you can work around it by using the newly supported |
I don't know that - the schema is supposed to work for any tree-sitter grammar out there. It just happens that Not sure if update: yeah |
How about using of And, please, never use |
there's no immutable variant, is there? :/ |
I was trying to read a grammar.json file from tree-sitter: it looks like this
Notably, the first rule is supposed to be the entrypoint to parsing a file. However, when I tried to model this as Smithy:
and read it as JSON:
Then
source_file
was actually last - in any case, the ordering is not preserved.Is this something we should support, maybe with an optional meta trait that'd turn the map into a
ListMap
? Or should it be the default?Tested on 0.18.27.
The text was updated successfully, but these errors were encountered: