Skip to content

Commit dd3ea43

Browse files
committed
Revert "Work around compiler bug: nim-lang/Nim#2630"
This reverts commit 5cae290.
1 parent c9b4247 commit dd3ea43

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/docopt.nim

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,7 @@ method match(self: Required, left: seq[Pattern],
283283
collected: seq[Pattern] = @[]): MatchResult =
284284
result = (true, left, collected)
285285
for pattern in self.children:
286-
let t = pattern.match(result.left, result.collected)
287-
result = t
286+
result = pattern.match(result.left, result.collected)
288287
if not result.matched:
289288
return (false, left, collected)
290289

@@ -293,8 +292,7 @@ method match(self: Optional, left: seq[Pattern],
293292
collected: seq[Pattern] = @[]): MatchResult =
294293
result = (true, left, collected)
295294
for pattern in self.children:
296-
let t = pattern.match(result.left, result.collected)
297-
result = t
295+
result = pattern.match(result.left, result.collected)
298296
result.matched = true
299297

300298

@@ -306,8 +304,7 @@ method match(self: OneOrMore, left: seq[Pattern],
306304
var times = 0
307305
while result.matched:
308306
# could it be that something didn't match but changed l or c?
309-
let t = self.children[0].match(result.left, result.collected)
310-
result = t
307+
result = self.children[0].match(result.left, result.collected)
311308
if result.matched:
312309
times += 1
313310
if l2 == result.left:

0 commit comments

Comments
 (0)