aboutsummaryrefslogtreecommitdiff
path: root/src/parcom.cr
diff options
context:
space:
mode:
Diffstat (limited to 'src/parcom.cr')
-rw-r--r--src/parcom.cr17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/parcom.cr b/src/parcom.cr
index b6e6c3b..4bfed1c 100644
--- a/src/parcom.cr
+++ b/src/parcom.cr
@@ -81,23 +81,6 @@ module Parcom
end
end
- class TokenSeq(T) < Parser(T, Array(T))
- @p : Sequence(T, T)
-
- def initialize(expected : Iterable(T))
- ps = [] of Parser(T, T)
- expected.each { |t| ps << Token.new(t) }
-
- @p = Sequence.new(ps)
- end
-
- def parse(tokens : Tokens(T)) : Result(T, Array(T))
- @p.parse(tokens)
- rescue ex : ParserFail
- raise ParserFail.new("TokenSeq: #{ex.message}")
- end
- end
-
class Exactly(T, V) < Parser(T, Array(V))
@p : Sequence(T, V)