You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 19, 2020. It is now read-only.
Currently, the same syntax is used for both tuple-structs and normal structs,and unit structs.
The current implementation requires a name for each capture group, even though they aren't used for tuple-structs. A superset of the syntax could be introduced to support tuples, allowing both unnamed and named variations on the {} syntax.
To keep the implementations similar, a parameter or or type parameter could be provided to the frontend parser function.
The MatcherToken could get a superset copy of itself, or could be expanded to hold both. The advantage of keeping them separate, is that one could only produce Captures and the other one Vec<String> when matching, but would likely require a duplication of a lot of otherwise sharable logic as a downside.
Description
Currently, the same syntax is used for both tuple-structs and normal structs,and unit structs.
The current implementation requires a name for each capture group, even though they aren't used for tuple-structs. A superset of the syntax could be introduced to support tuples, allowing both unnamed and named variations on the
{}syntax.To keep the implementations similar, a parameter or or type parameter could be provided to the frontend parser function.
The MatcherToken could get a superset copy of itself, or could be expanded to hold both. The advantage of keeping them separate, is that one could only produce
Capturesand the other oneVec<String>when matching, but would likely require a duplication of a lot of otherwise sharable logic as a downside.