diff options
| author | Ganesh Viswanathan <dev@genotrance.com> | 2018-07-11 23:03:14 -0500 |
|---|---|---|
| committer | Ganesh Viswanathan <dev@genotrance.com> | 2018-07-11 23:03:14 -0500 |
| commit | bb4073ba97e5d1e22d42bf5e326bbffd0512bfb4 (patch) | |
| tree | 771ebf33f5eb0f5fbb97623d7957d89a96f1a8cc | |
| parent | 2766607277b3d86935f082d6f9afb016c302b661 (diff) | |
| download | nimgen-bb4073ba97e5d1e22d42bf5e326bbffd0512bfb4.tar.gz nimgen-bb4073ba97e5d1e22d42bf5e326bbffd0512bfb4.zip | |
Merge latest
| -rw-r--r-- | nimgen.nim | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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]) |
