aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGanesh Viswanathan <dev@genotrance.com>2020-05-27 10:25:48 -0500
committerGanesh Viswanathan <dev@genotrance.com>2020-05-27 10:25:48 -0500
commite8baeb92294328d9750469f852816c5a47375954 (patch)
tree55a8b21946fc3f2f04178dfe323e25c6d05ac8ad
parent0e3c2d02f9566786d106687239fc39331e72cf41 (diff)
downloadnimterop-bugs-1.tar.gz
nimterop-bugs-1.zip
Fix #222bugs-1
-rw-r--r--nimterop/ast2.nim2
-rw-r--r--nimterop/build.nim3
-rw-r--r--tests/include/tast2.h2
3 files changed, 5 insertions, 2 deletions
diff --git a/nimterop/ast2.nim b/nimterop/ast2.nim
index 759ddfd..de3b452 100644
--- a/nimterop/ast2.nim
+++ b/nimterop/ast2.nim
@@ -608,7 +608,7 @@ iterator newIdentDefs(gState: State, name: string, node: TSNode, offset: SomeInt
# Skip qualifiers after type
var
start = start0
- while start < node.len - 1 and node[start+1].getName() == "type_qualifier":
+ while start < node.len - 1 and node[start+1].getName() in ["type_qualifier", "comment"]:
start += 1
if start == node.len - 1:
diff --git a/nimterop/build.nim b/nimterop/build.nim
index 58ecbd1..e0d630a 100644
--- a/nimterop/build.nim
+++ b/nimterop/build.nim
@@ -365,6 +365,9 @@ proc gitPull*(url: string, outdir = "", plist = "", checkout = "") =
discard execAction(&"cd {outdirQ} && git config core.sparsecheckout true")
writeFile(sparsefile, plist)
+ # In case directory has old files from another run
+ discard execAction(&"cd {outdirQ} && git clean -fxd")
+
if checkout.len != 0:
echo "# Checking out " & checkout
discard execAction(&"cd {outdirQ} && git fetch", retry = 1)
diff --git a/tests/include/tast2.h b/tests/include/tast2.h
index b8433f9..019f7c4 100644
--- a/tests/include/tast2.h
+++ b/tests/include/tast2.h
@@ -90,7 +90,7 @@ typedef char *(*A11)[3];
typedef struct A0 *A111[12];
typedef int
- **(*A12)(int, int b, int *c, int *, int *count[4], int (*func)(int, int)),
+ **(*A12)(int, int b, int *c, int *, int /*out*/ *count[4], int (*func)(int, int)),
**(*A121)(float, float b, float *c, float *, float *count[4], float (*func)(float, float)),
**(*A122)(char, char b, char *c, char *, char *count[4], char (*func)(char, char));
typedef int (*A13)(int, int, void (*func)(void));