Merge latest
This commit is contained in:
parent
2766607277
commit
bb4073ba97
1 changed files with 6 additions and 6 deletions
12
nimgen.nim
12
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])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue