summary refs log tree commit diff stats
path: root/tests/stdlib/treloop.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stdlib/treloop.nim')
-rw-r--r--tests/stdlib/treloop.nim9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/stdlib/treloop.nim b/tests/stdlib/treloop.nim
new file mode 100644
index 000000000..35236708c
--- /dev/null
+++ b/tests/stdlib/treloop.nim
@@ -0,0 +1,9 @@
+discard """
+  output: "@[(, +,  1,  2, )]"
+"""
+
+import re
+
+let str = "(+ 1 2)"
+var tokenRE = re"""[\s,]*(~@|[\[\]{}()'`~^@]|"(?:\\.|[^\\"])*"|;.*|[^\s\[\]{}('"`,;)]*)"""
+echo str.findAll(tokenRE)