diff options
author | Araq <rumpf_a@web.de> | 2015-10-25 02:35:18 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-10-25 02:35:18 +0200 |
commit | cd7b5ae1eb999434aebdf81aeecae754457cacb5 (patch) | |
tree | 10d469e46cb876e63f78241c67fec86c36e9bbe8 /tests/parser | |
parent | c1c76a20e6e988377cc4d757ca0eedcfcbbaa537 (diff) | |
download | Nim-cd7b5ae1eb999434aebdf81aeecae754457cacb5.tar.gz |
fixes #1799 properly
Diffstat (limited to 'tests/parser')
-rw-r--r-- | tests/parser/tdoc_comments.nim | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/tests/parser/tdoc_comments.nim b/tests/parser/tdoc_comments.nim new file mode 100644 index 000000000..fa1374b45 --- /dev/null +++ b/tests/parser/tdoc_comments.nim @@ -0,0 +1,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 |