re.nim compiles again

This commit is contained in:
Araq
2013-05-01 00:28:11 +02:00
parent 427f84b4ec
commit eaeb26f003

View File

@@ -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 ------------------------------