diff options
Diffstat (limited to 'src/parcom.cr')
| -rw-r--r-- | src/parcom.cr | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/parcom.cr b/src/parcom.cr index c7dde7b..4f35420 100644 --- a/src/parcom.cr +++ b/src/parcom.cr @@ -119,20 +119,6 @@ module Parcom end end - class Some(T, V) < Parser(T, Array(V)) - @p : Assert(T, Array(V)) - - def initialize(p : Parser(T, V)) - @p = Many.new(p).assert { |arr| !arr.empty? } - end - - def parse(tokens : Tokens(T)) : Result(T, Array(V)) - @p.parse(tokens) - rescue ex : ParserFail - raise ParserFail.new("Some: #{ex.message}") - end - end - class Exactly(T, V) < Parser(T, Array(V)) @p : Sequence(T, V) |
