From 8e9bd0da0d321f5548d90c34debaaf7dec780bda Mon Sep 17 00:00:00 2001 From: Ganesh Viswanathan Date: Thu, 24 Oct 2019 18:56:46 -0500 Subject: Add incompleteStruct pragma --- nimterop/grammar.nim | 3 +++ 1 file changed, 3 insertions(+) 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)}" -- cgit v1.2.3