mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-06 13:07:48 +00:00
re.nim compiles again
This commit is contained in:
@@ -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 ------------------------------
|
||||
|
||||
Reference in New Issue
Block a user