new tester; all tests categorized
This commit is contained in:
parent
51ee524109
commit
20b5f31c03
481 changed files with 794 additions and 2506 deletions
22
tests/generics/tgenericmatcher.nim
Normal file
22
tests/generics/tgenericmatcher.nim
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
discard """
|
||||
disabled: false
|
||||
"""
|
||||
|
||||
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