Improve static inline handling

This commit is contained in:
Ganesh Viswanathan 2019-10-16 14:21:53 -05:00
commit 531843a82a

View file

@ -191,7 +191,7 @@ proc removeStatic(content: string): string =
## Replace static function bodies with a semicolon and commented
## out body
return content.replace(
re"(?ms)static inline(.*?\))(\s*\{(\s*?.*?$)*?[\n\r]\})",
re"(?msU)static inline ([^)]+\))([^}]+\})",
proc (m: RegexMatch, s: string): string =
let funcDecl = s[m.group(0)[0]]
let body = s[m.group(1)[0]].strip()