From e8baeb92294328d9750469f852816c5a47375954 Mon Sep 17 00:00:00 2001 From: Ganesh Viswanathan Date: Wed, 27 May 2020 10:25:48 -0500 Subject: Fix #222 --- nimterop/ast2.nim | 2 +- nimterop/build.nim | 3 +++ tests/include/tast2.h | 2 +- 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)); -- cgit v1.2.3