Skip to content

Commit

Permalink
matching: Consider nnkTupleConstr as tuple (nim-lang#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
Clyybber authored Mar 29, 2021
1 parent 16c4f6e commit fb16554
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fusion/matching.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ func fixBrokenBracket(inNode: NimNode): NimNode =
func isBrokenPar(n: NimNode): bool =
result = (
n.kind == nnkCommand and
n[1].kind == nnkPar
n[1].kind in {nnkPar, nnkTupleConstr}
)


Expand Down Expand Up @@ -1139,7 +1139,7 @@ func parseMatchExpr*(n: NimNode): Match =
result.rhsNode = n
result.infix = "=="

of nnkPar: # Named or unnamed tuple
of nnkPar, nnkTupleConstr: # Named or unnamed tuple
if n.isNamedTuple(): # `(fld1: ...)`
result = parseKVTuple(n)

Expand Down

0 comments on commit fb16554

Please sign in to comment.