diff options
author | Araq <rumpf_a@web.de> | 2013-05-01 00:28:11 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-05-01 00:28:11 +0200 |
commit | eaeb26f0037b04f58b755770e3ba401cb0b877a2 (patch) | |
tree | 1437a64e3933eb19db116f176d8afc435c347c51 | |
parent | 427f84b4ec8e6d7d933b1b8142266aa5fa191a3e (diff) | |
download | Nim-eaeb26f0037b04f58b755770e3ba401cb0b877a2.tar.gz |
re.nim compiles again
-rw-r--r-- | lib/impure/re.nim | 3 |
1 files changed, 2 insertions, 1 deletions
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 ------------------------------ |