Add incompleteStruct pragma
This commit is contained in:
parent
3c960c140c
commit
8e9bd0da0d
1 changed files with 3 additions and 0 deletions
|
|
@ -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)}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue