From ddcf7c598e3cf5b1239d4e0045f7cf9374366427 Mon Sep 17 00:00:00 2001 From: Matthew Hall Date: Mon, 13 Mar 2023 19:39:34 +1300 Subject: Documentation for TokenSeq --- src/parcom.cr | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'src/parcom.cr') 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) -- cgit v1.2.1