diff options
Diffstat (limited to 'tests/macros/tlexerex.nim')
-rw-r--r-- | tests/macros/tlexerex.nim | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/tests/macros/tlexerex.nim b/tests/macros/tlexerex.nim deleted file mode 100644 index d348a4bcc..000000000 --- a/tests/macros/tlexerex.nim +++ /dev/null @@ -1,16 +0,0 @@ - -import macros - -macro match*(s: cstring|string; pos: int; sections: untyped): untyped = - for sec in sections.children: - expectKind sec, nnkOfBranch - expectLen sec, 2 - result = newStmtList() - -when isMainModule: - var input = "the input" - var pos = 0 - match input, pos: - of r"[a-zA-Z_]\w+": echo "an identifier" - of r"\d+": echo "an integer" - of r".": echo "something else" |