From bb4073ba97e5d1e22d42bf5e326bbffd0512bfb4 Mon Sep 17 00:00:00 2001 From: Ganesh Viswanathan Date: Wed, 11 Jul 2018 23:03:14 -0500 Subject: Merge latest --- nimgen.nim | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nimgen.nim b/nimgen.nim index 4e540d8..e3a0883 100644 --- a/nimgen.nim +++ b/nimgen.nim @@ -342,9 +342,9 @@ proc removeStatic(filename: string) = withFile(filename): content = content.replace( re"(?m)(static inline.*?\))(\s*\{(\s*?.*?$)*[\n\r]\})", - proc (match: RegexMatch): string = - let funcDecl = match.captures[0] - let body = match.captures[1].strip() + proc (m: RegexMatch, s: string): string = + let funcDecl = s[m.group(0)[0]] + let body = s[m.group(1)[0]].strip() result = "" result.add("$#;" % [funcDecl]) @@ -357,9 +357,9 @@ proc reAddStatic(filename: string) = withFile(filename): content = content.replace( re"(?m)(static inline.*?\));(\/\/\s*\{(\s*?.*?$)*[\n\r]\/\/\})", - proc (match: RegexMatch): string = - let funcDecl = match.captures[0] - let body = match.captures[1].strip() + proc (m: RegexMatch, s: string): string = + let funcDecl = s[m.group(0)[0]] + let body = s[m.group(1)[0]].strip() result = "" result.add("$# " % [funcDecl]) -- cgit v1.2.3