summary refs log tree commit diff stats
path: root/tests/parser
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-01-17 23:46:23 +0100
committerAndreas Rumpf <rumpf_a@web.de>2016-01-17 23:46:23 +0100
commit3114523a6ff0f0d19aeffcb25a21a7f954dc74fa (patch)
treedacc35c9de95c6bca17585208b42acced6e82589 /tests/parser
parenta9f6e2a843f2152676e1eb7fd043022a2fece114 (diff)
downloadNim-3114523a6ff0f0d19aeffcb25a21a7f954dc74fa.tar.gz
fixes multi-line comments
Diffstat (limited to 'tests/parser')
-rw-r--r--tests/parser/tmultiline_comments.nim30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/parser/tmultiline_comments.nim b/tests/parser/tmultiline_comments.nim
index 72832479d..7a3bb5304 100644
--- a/tests/parser/tmultiline_comments.nim
+++ b/tests/parser/tmultiline_comments.nim
@@ -32,3 +32,33 @@ proc bar =
   ##[Long documentation comment
   here.
   ]##
+
+
+proc write(a: auto, x: varargs[string, `$`]) =
+  stdout.write ($a)
+  for o in x:
+    stdout.write(o)
+
+proc writeln(a: auto, x: varargs[string, `$`]) =
+  write a, x
+  stdout.write "\n"
+
+proc write() = write(stdout)
+proc writeln() =
+  stdout.write "\n"
+
+#[  #[ Multiline comment in already
+   commented out code. ]#
+proc p[T](x: T) = discard
+]#
+
+var hello = #[(x in bar)^^ "Hello" # greetings
+]#"Hello"
+proc maino =
+  write hello, " Test Me "
+  writeln()
+  write 3
+  block:
+    write()
+    write " times more"
+  #[ test ]#  writeln " Again"