aboutsummaryrefslogtreecommitdiff
path: root/src/parcom.cr
diff options
context:
space:
mode:
Diffstat (limited to 'src/parcom.cr')
-rw-r--r--src/parcom.cr28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/parcom.cr b/src/parcom.cr
index acb0503..e421e5e 100644
--- a/src/parcom.cr
+++ b/src/parcom.cr
@@ -81,34 +81,6 @@ module Parcom
end
end
- class Left(T, V, U) < Parser(T, V)
- @p : Map(T, {V, U}, V)
-
- def initialize(p1 : Parser(T, V), p2 : Parser(T, U))
- @p = (p1 + p2).map(&.first)
- end
-
- def parse(tokens : Tokens(T)) : Result(T, V)
- @p.parse(tokens)
- rescue ex : ParserFail
- raise ParserFail.new("Left: #{ex.message}")
- end
- end
-
- class Right(T, V, U) < Parser(T, U)
- @p : Map(T, {V, U}, U)
-
- def initialize(p1 : Parser(T, V), p2 : Parser(T, U))
- @p = (p1 + p2).map(&.last)
- end
-
- def parse(tokens : Tokens(T)) : Result(T, U)
- @p.parse(tokens)
- rescue ex : ParserFail
- raise ParserFail.new("Right: #{ex.message}")
- end
- end
-
class Recover(T, V) < Parser(T, V)
@p : Map(T, V?, V)