diff --git a/nimterop.nimble b/nimterop.nimble index d72ab8d..16a7100 100644 --- a/nimterop.nimble +++ b/nimterop.nimble @@ -17,15 +17,15 @@ proc execCmd(cmd: string) = exec cmd proc tsoloud() = - execCmd "nim c -r tests/tsoloud.nim" + execCmd "nim c --forceBuild -r tests/tsoloud.nim" execCmd "nim cpp -r tests/tsoloud.nim" task test, "Test": - execCmd "nim c -r tests/tnimterop_c.nim" + execCmd "nim c -f -r tests/tnimterop_c.nim" execCmd "nim cpp -r tests/tnimterop_c.nim" - execCmd "nim cpp -r tests/tnimterop_cpp.nim" + execCmd "nim cpp -f -r tests/tnimterop_cpp.nim" when defined(windows): - execCmd "nim c -r tests/tmath.nim" + execCmd "nim c -f -r tests/tmath.nim" execCmd "nim cpp -r tests/tmath.nim" when not defined(OSX): when defined(Windows): diff --git a/nimterop/ast.nim b/nimterop/ast.nim index 8191ac6..62cf05e 100644 --- a/nimterop/ast.nim +++ b/nimterop/ast.nim @@ -38,9 +38,10 @@ proc saveNodeData(node: TSNode): bool = if node.tsNodeType() == "field_identifier" and pname == "pointer_declarator" and - ppname == "function_declarator" and - pppname == "pointer_declarator": + ppname == "function_declarator": + if pppname == "pointer_declarator": gStateRT.data.insert(("pointer_declarator", ""), gStateRT.data.len-1) + gStateRT.data.add(("function_declarator", "")) elif name in gExpressions: if $node.tsNodeParent.tsNodeType() notin gExpressions: