aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGanesh Viswanathan <dev@genotrance.com>2019-05-07 15:43:54 -0500
committerGanesh Viswanathan <dev@genotrance.com>2019-05-07 15:43:54 -0500
commit961a739a4ac601875a0bded4df8018fd4689ef95 (patch)
treec988d41f177c5e61730315dce8689bb1bc3ad2c9
parentba9b9f0bc1e8d56c68333dac9a753588ff9b4ad9 (diff)
downloadnimterop-961a739a4ac601875a0bded4df8018fd4689ef95.tar.gz
nimterop-961a739a4ac601875a0bded4df8018fd4689ef95.zip
Fix illegal recursion typedefs
-rw-r--r--nimterop/grammar.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/nimterop/grammar.nim b/nimterop/grammar.nim
index 22a0456..5ae8741 100644
--- a/nimterop/grammar.nim
+++ b/nimterop/grammar.nim
@@ -197,11 +197,11 @@ proc initGrammar(): Grammar =
var
flen = nimState.data[i].val
if nimState.data[i].name == "identifier":
- flen = flen.getIdentifier(nskConst, name)
+ flen = flen.getIdentifier(nskConst, nname)
nimState.typeStr &= &"\n {nname}*{pragma} = {aptr}array[{flen}, {getPtrType(tptr&typ)}]"
else:
- if name == typ:
+ if nname == typ:
nimState.typeStr &= &"\n {nname}*{pragma} = object"
else:
nimState.typeStr &= &"\n {nname}*{pragma} = {getPtrType(tptr&typ)}"