documented AST overloading and some TR optimizations

This commit is contained in:
Araq 2012-12-09 03:02:52 +01:00
commit 92f8f2e776
6 changed files with 109 additions and 10 deletions

13
tests/patterns/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'")