This commit is contained in:
Araq 2014-04-06 22:05:42 +02:00
commit 7c065bfadf
12 changed files with 10 additions and 2 deletions

13
tests/trmacros/thoist.nim Normal file
View file

@ -0,0 +1,13 @@
discard """
output: '''true
true'''
"""
import pegs
template optPeg{peg(pattern)}(pattern: string{lit}): TPeg =
var gl {.global, gensym.} = peg(pattern)
gl
echo match("(a b c)", peg"'(' @ ')'")
echo match("W_HI_Le", peg"\y 'while'")