Fix enum identifier or'd, add configure support

This commit is contained in:
Ganesh Viswanathan 2019-05-06 23:45:25 -05:00
commit d21ec6287b
2 changed files with 20 additions and 2 deletions

View file

@ -13,7 +13,7 @@ proc saveNodeData(node: TSNode, nimState: NimState): bool =
if name == "primitive_type" and node.tsNodeParent.tsNodeType() == "sized_type_specifier":
return true
if name == "number_literal" and $node.tsNodeParent.tsNodeType() in gExpressions:
if name in ["number_literal", "identifier"] and $node.tsNodeParent.tsNodeType() in gExpressions:
return true
if name in ["primitive_type", "sized_type_specifier"]:
@ -174,4 +174,4 @@ proc printNim*(fullpath: string, root: TSNode, astTable: AstTable) =
echo &"{nimState.procStr}\n"
if nimState.debugStr.nBl:
echo nimState.debugStr
echo nimState.debugStr

View file

@ -118,3 +118,21 @@ proc gitPull*(url: string, outdir = "", plist = "", checkout = "") =
else:
echo "Pulling repository"
discard execAction(&"cd {outdirQ} && git pull --depth=1 origin master")
proc configure*(path, check: string) =
if (path / check).fileExists():
return
echo "Configuring " & path
if not fileExists(path / "configure"):
if fileExists(path / "autogen.sh"):
echo " Running autogen.sh"
discard execAction(&"cd {path.quoteShell} && bash autogen.sh")
if fileExists(path / "configure"):
echo " Running configure"
discard execAction(&"cd {path.quoteShell} && bash configure")