Add Builder
This commit is contained in:
16
src_v2/parser/builder_types.nim
Normal file
16
src_v2/parser/builder_types.nim
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import fp/[
|
||||||
|
resultM,
|
||||||
|
]
|
||||||
|
import ./parser_types
|
||||||
|
|
||||||
|
type
|
||||||
|
Builder*[T] = tuple[
|
||||||
|
parser: Parser,
|
||||||
|
tree: seq[T]
|
||||||
|
]
|
||||||
|
builderErrorKind* = enum
|
||||||
|
parserError
|
||||||
|
BuilderError*[T] = ref object
|
||||||
|
kind*: builderErrorKind
|
||||||
|
builder*: Builder[T]
|
||||||
|
BuilderResult*[T] = Result[Builder[T], BuilderError[T]]
|
||||||
Reference in New Issue
Block a user