Class: RParsec::Failures
- Inherits:
-
Object
- Object
- RParsec::Failures
- Defined in:
- lib/rparsec/failures.rb
Overview
:nodoc:
Class Method Summary collapse
Class Method Details
.add_error(err, e) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/rparsec/failures.rb', line 3 def self.add_error(err, e) return e if err.nil? return err if e.nil? cmp = compare_error(err, e) return err if cmp > 0 return e if cmp < 0 err end |