diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/astspec.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/astspec.txt b/doc/astspec.txt index 6b64e5b91..ef0c91bb8 100644 --- a/doc/astspec.txt +++ b/doc/astspec.txt @@ -878,6 +878,26 @@ AST: # ... ) +Static types, like ``static[int]``, use ``nnkIdent`` wrapped in +``nnkStaticTy``. + +Concrete syntax: + +.. code-block:: nim + type A[T: static[int]] = object + +AST: + +.. code-block:: nim + # ... within nnkGenericParams + nnkIdentDefs( + nnkIdent(!"T"), + nnkStaticTy( + nnkIdent(!"int") + ), + nnkEmpty() + ) + # ... Procedure declaration --------------------- |