Class: DParse::Parsers::Fail
Instance Method Summary
collapse
#apply, #bind, #capture, #compact, #first, #flatten, #ignore, #map, #match?, #second, #select_even, #select_odd, #to_s
Instance Method Details
#expectation_message ⇒ Object
12
13
14
|
# File 'lib/d-parse/parsers/primitives/fail.rb', line 12
def expectation_message
'nothing (always fail)'
end
|
#inspect ⇒ Object
8
9
10
|
# File 'lib/d-parse/parsers/primitives/fail.rb', line 8
def inspect
'fail()'
end
|
#read(input, pos) ⇒ Object
4
5
6
|
# File 'lib/d-parse/parsers/primitives/fail.rb', line 4
def read(input, pos)
Failure.new(input, pos, origin: self)
end
|