Files
Nim/tests/trmacros/thoist.nim
2014-04-06 22:05:42 +02:00

14 lines
242 B
Nim

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'")