-
Notifications
You must be signed in to change notification settings - Fork 17
Add rust-style tuples? #48
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested
Now that we have more emphasis on testing rust <-> rust, we should support more builtin rust concepts. Tuples are a relatively easy one to start with.
If you want to do this, then I suggest adding a new case to Tydent in the parser, and then chasing the compiler errors (i like using exhaustive matches to make this kind of change accessible):
abi-cafe/kdl-script/src/parse.rs
Lines 153 to 166 in 6a7db03
Tuples are essentially analogous to arrays, except "get the element type" is done inside the loop instead of outside the loop. So I think everywhere you need to change you'll find some code for handling arrays you can copy and tweak.
You would roughly need to: