ugh, maybe broke git
This commit is contained in:
parent
dc669155e3
commit
4741e8f9a1
25 changed files with 587 additions and 172 deletions
19
tests/accept/compile/tgenericmatcher.nim
Normal file
19
tests/accept/compile/tgenericmatcher.nim
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
type
|
||||
TMatcherKind = enum
|
||||
mkTerminal, mkSequence, mkAlternation, mkRepeat
|
||||
TMatcher[T] = object
|
||||
case kind: TMatcherKind
|
||||
of mkTerminal:
|
||||
value: T
|
||||
of mkSequence, mkAlternation:
|
||||
matchers: seq[TMatcher[T]]
|
||||
of mkRepeat:
|
||||
matcher: PMatcher[T]
|
||||
min, max: int
|
||||
PMatcher[T] = ref TMatcher[T]
|
||||
|
||||
var
|
||||
m: PMatcher[int]
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue