aboutsummaryrefslogtreecommitdiff
path: root/src/parcom.cr
diff options
context:
space:
mode:
Diffstat (limited to 'src/parcom.cr')
-rw-r--r--src/parcom.cr12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/parcom.cr b/src/parcom.cr
index f6d1e05..4612887 100644
--- a/src/parcom.cr
+++ b/src/parcom.cr
@@ -81,16 +81,6 @@ module Parcom
end
end
- class Eof(T) < Parser(T, Nil)
- def parse(tokens : Tokens(T)) : Result(T, Nil)
- if tokens.empty?
- Result.new(tokens, nil)
- else
- raise ParserFail.new("Eof: input was not empty")
- end
- end
- end
-
class Peek(T, V) < Parser(T, V)
def initialize(@p : Parser(T, V))
end
@@ -179,7 +169,7 @@ module Parcom
@p : Map(T, {V, Nil}, V)
def initialize(p : Parser(T, V))
- @p = (p + Eof(T).new).map &.first
+ @p = (p + EOF(T).new).map &.first
end
def parse(tokens : Tokens(T)) : Result(T, V)