Closed robrix closed 9 years ago
/cc @jspahrsummers
In hindsight, this should actually be the parsed range, i.e. the range starting at the index which -->
started at, and ending at the index which its parser ended at.
It also needs to receive the source collection if it’s going to do anything useful with the indices in arbitrary collections. String
indices don’t translate from one String
to another, IIRC; and it’s certainly not the case that indices in general do.
Additionally, the parse tree should be the final parameter to make it easier to ignore the index and collection with implicit closure args if Swift for some reason infers the wrong -->
.
Alright, this is looking pretty good :sparkles:
-->
can now accept a function taking the parse index.Fixes #61.