Class: TRuby::ParserCombinator::Fail
- Defined in:
- lib/t_ruby/parser_combinator.rb
Overview
Always fail
Instance Method Summary collapse
-
#initialize(message) ⇒ Fail
constructor
A new instance of Fail.
- #parse(input, position = 0) ⇒ Object
Methods inherited from Parser
#<<, #>>, #between, #flat_map, #label, #lookahead, #many, #many1, #map, #not_followed_by, #optional, #sep_by, #sep_by1, #|
Constructor Details
#initialize(message) ⇒ Fail
205 206 207 |
# File 'lib/t_ruby/parser_combinator.rb', line 205 def initialize() @message = end |
Instance Method Details
#parse(input, position = 0) ⇒ Object
209 210 211 |
# File 'lib/t_ruby/parser_combinator.rb', line 209 def parse(input, position = 0) ParseResult.failure(@message, input, position) end |