From eaeb26f0037b04f58b755770e3ba401cb0b877a2 Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 1 May 2013 00:28:11 +0200 Subject: [PATCH] re.nim compiles again --- lib/impure/re.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/impure/re.nim b/lib/impure/re.nim index 57dc3a313..ef02a3b1d 100644 --- a/lib/impure/re.nim +++ b/lib/impure/re.nim @@ -239,8 +239,9 @@ template `=~` *(s: string, pattern: TRegEx): expr = ## else: ## echo("syntax error") ## + bind maxSubPatterns when not definedInScope(matches): - var matches {.inject.}: array[0..re.maxSubPatterns-1, string] + var matches {.inject.}: array[0..maxSubPatterns-1, string] match(s, pattern, matches) # ------------------------- more string handling ------------------------------