Handle cligen split issue

This commit is contained in:
Ganesh Viswanathan 2019-01-23 20:46:01 -06:00
commit 1a8e489b0f
2 changed files with 9 additions and 1 deletions

View file

@ -1,4 +1,4 @@
import macros, os, sets, strformat, strutils, tables
import macros, os, sequtils, sets, strformat, strutils, tables
import regex
@ -303,3 +303,7 @@ proc getNimExpression*(expr: string): string =
("^", " xor "), ("&", " and "), ("|", " or "),
("~", " not ")
])
proc getSplitComma*(joined: seq[string]): seq[string] =
for i in joined:
result = result.concat(i.split(","))

View file

@ -129,6 +129,10 @@ proc main(
symOverride: symOverride
)
when defined(Windows):
# Workaround https://github.com/c-blake/cligen/issues/87
gStateRT.symOverride = gStateRT.symOverride.getSplitComma()
if pgrammar:
parseGrammar()
printGrammar()