summary refs log tree commit diff stats
path: root/tests/stdlib/tgenast.nim
Commit message (Expand)AuthorAgeFilesLines
* make more standard libraries work with `nimPreviewSlimSystem` (#20343)ringabout2022-09-271-0/+1
* defaults to ORC (#19972)ringabout2022-09-231-0/+4
* new `genAst` as replacement for `quote do` (#17426)Timothee Cour2021-04-021-0/+269
4'>44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
# bug #1799

proc MyProc1*() = ## Comment behind procedure
  discard

proc MyProc2*() =
  ## Comment below procedure
  discard


template MyTemplate1*() = discard ## Comment behind template

template MyTemplate2*() = discard
  ## Comment below template


const
  MyConst1* = 1 ## Comment behind constant
  MyConst2* = 2
    ## Comment below constant


var
  MyVar1* = 1 ## Comment behind variable
  MyVar2* = 2
    ## Comment below variable


type
  MyObject1* = object
    ## Comment below declaration
    field1*: int ## Comment behind field
    field2*: int ## Comment behind field
    field3*: int
      ## Comment below field
    field4*: int
      ## Comment below field

  MyObject2* = object ## Comment behind declaration
    field1*: int


type
  MyTuple1* = tuple
    ## Comment below declaration
    field1: int ## Comment behind field
    field2: int ## Comment behind field
    field3: int
      ## Comment below field
    field4: int
      ## Comment below field

  MyTuple2* = tuple ## Comment behind declaration
    field1: int


type
  MyEnum1* = enum
    ## Comment below declaration
    value1, ## Comment behind value
    value2,
      ## Comment below value with comma
    value3
      ## Comment below value without comma

  MyEnum2* = enum ## Comment behind declaration
    value4

  MyEnum3* = enum
    value5  ## only document the enum value