Class: Treetop::Runtime::CompiledParser
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#failure_message ⇒ Object
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/less.rb', line 36 def return nil unless (tf = terminal_failures) && tf.size > 0 "on line #{failure_line}: expected " + ( tf.size == 1 ? tf[0].expected_string : "one of #{tf.map {|f| f.expected_string }.uniq * ' '}" ) + " got `#{input[failure_index]}`" + " after:\n\n#{input[index...failure_index]}\n" end |