summary refs log tree commit diff stats
path: root/tests/stdlib/treloop.nim
blob: 35236708cb14d60458b87e5b3994d04d62dd6554 (plain) (blame)
1
2
3
4
5
6
7
8
9
discard """
  output: "@[(, +,  1,  2, )]"
"""

import re

let str = "(+ 1 2)"
var tokenRE = re"""[\s,]*(~@|[\[\]{}()'`~^@]|"(?:\\.|[^\\"])*"|;.*|[^\s\[\]{}('"`,;)]*)"""
echo str.findAll(tokenRE)