diff options
| author | Ganesh Viswanathan <dev@genotrance.com> | 2019-10-24 18:56:46 -0500 |
|---|---|---|
| committer | Ganesh Viswanathan <dev@genotrance.com> | 2019-10-24 18:56:46 -0500 |
| commit | 8e9bd0da0d321f5548d90c34debaaf7dec780bda (patch) | |
| tree | 99f0824ef81a875d1b718d7e7447a8c379cf9e18 | |
| parent | 3c960c140c1237231c99cd34896752abc35fb371 (diff) | |
| download | nimterop-8e9bd0da0d321f5548d90c34debaaf7dec780bda.tar.gz nimterop-8e9bd0da0d321f5548d90c34debaaf7dec780bda.zip | |
Add incompleteStruct pragma
| -rw-r--r-- | nimterop/grammar.nim | 3 |
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)}" |
