tdoc_comments.nim 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # bug #1799
  2. proc MyProc1*() = ## Comment behind procedure
  3. discard
  4. proc MyProc2*() =
  5. ## Comment below procedure
  6. discard
  7. template MyTemplate1*() = discard ## Comment behind template
  8. template MyTemplate2*() = discard
  9. ## Comment below template
  10. const
  11. MyConst1* = 1 ## Comment behind constant
  12. MyConst2* = 2
  13. ## Comment below constant
  14. var
  15. MyVar1* = 1 ## Comment behind variable
  16. MyVar2* = 2
  17. ## Comment below variable
  18. type
  19. MyObject1* = object
  20. ## Comment below declaration
  21. field1*: int ## Comment behind field
  22. field2*: int ## Comment behind field
  23. field3*: int
  24. ## Comment below field
  25. field4*: int
  26. ## Comment below field
  27. MyObject2* = object ## Comment behind declaration
  28. field1*: int
  29. type
  30. MyTuple1* = tuple
  31. ## Comment below declaration
  32. field1: int ## Comment behind field
  33. field2: int ## Comment behind field
  34. field3: int
  35. ## Comment below field
  36. field4: int
  37. ## Comment below field
  38. MyTuple2* = tuple ## Comment behind declaration
  39. field1: int
  40. type
  41. MyEnum1* = enum
  42. ## Comment below declaration
  43. value1, ## Comment behind value
  44. value2,
  45. ## Comment below value with comma
  46. value3
  47. ## Comment below value without comma
  48. MyEnum2* = enum ## Comment behind declaration
  49. value4
  50. MyEnum3* = enum
  51. value5 ## only document the enum value
  52. # bug #18847
  53. proc close*() = ## asdfasdfsdfa
  54. discard ## adsfasdfads