
| Key: |
STR-198
|
| Type: |
New Feature
|
| Status: |
Closed
|
| Resolution: |
Not A Bug
|
| Priority: |
Minor
|
| Assignee: |
Unassigned
|
| Reporter: |
Martin Bravenboer
|
| Votes: |
0
|
| Watchers: |
0
|
|
|
|
Original Estimate:
|
Unknown
|
Remaining Estimate:
|
Unknown
|
Time Spent:
|
Unknown
|
|
|
It would be useful to support concrete syntax for optional matches and builds. The optional match should perform a match of Some(_) and result in an unbound variable if there is None(). The build should try to build a Some(_) or create None() if that fails.
The contribution of this feature is that you don't need to write separate rules for both cases. This is especially frustrating if there are several optional constructs in a single syntactical construct (e.g. a for loop). It's tempting to fall back to abstract syntax in these cases.
This should be easy to implement. It probably introduces a special AST construct, similar to FromTerm, ToTerm and meta-var.
|
|
Description
|
It would be useful to support concrete syntax for optional matches and builds. The optional match should perform a match of Some(_) and result in an unbound variable if there is None(). The build should try to build a Some(_) or create None() if that fails.
The contribution of this feature is that you don't need to write separate rules for both cases. This is especially frustrating if there are several optional constructs in a single syntactical construct (e.g. a for loop). It's tempting to fall back to abstract syntax in these cases.
This should be easy to implement. It probably introduces a special AST construct, similar to FromTerm, ToTerm and meta-var.
|
Show » |
|
|