aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nimterop/grammar.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/nimterop/grammar.nim b/nimterop/grammar.nim
index 767c8f8..2d5cefb 100644
--- a/nimterop/grammar.nim
+++ b/nimterop/grammar.nim
@@ -216,6 +216,9 @@ proc initGrammar(): Grammar =
nimState.typeStr &= &"{nimState.getComments()}\n {nname}*{pragma} = {aptr}array[{flen}, {getPtrType(tptr&typ)}]"
else:
if nname == typ:
+ pragmas.add "incompleteStruct"
+ let
+ pragma = nimState.getPragma(pragmas)
nimState.typeStr &= &"{nimState.getComments()}\n {nname}*{pragma} = object"
else:
nimState.typeStr &= &"{nimState.getComments()}\n {nname}*{pragma} = {getPtrType(tptr&typ)}"