Add value-returning match expressions
This commit is contained in:
parent
b0a52de4ea
commit
ab783c33ed
12 changed files with 384 additions and 14 deletions
|
|
@ -133,6 +133,11 @@ func normalizeExprTypes(expression Expr, normalize func(string) string) {
|
|||
for _, item := range value.Values {
|
||||
normalizeExprTypes(item, normalize)
|
||||
}
|
||||
case MatchExpr:
|
||||
normalizeExprTypes(value.Value, normalize)
|
||||
for _, item := range value.Cases {
|
||||
normalizeExprTypes(item.Value, normalize)
|
||||
}
|
||||
case LambdaExpr:
|
||||
for i := range value.Params {
|
||||
value.Params[i].Type = normalize(value.Params[i].Type)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue