Class: Cfoo::ElParser
- Defined in:
- lib/cfoo/el_parser.rb
Class Method Summary collapse
Class Method Details
.parse(string) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/cfoo/el_parser.rb', line 8 def self.parse(string) return string if string.empty? parser = ElParser.new transform = ElTransform.new tree = parser.parse(string) transform.apply(tree) #rescue Parslet::ParseFailed => failure # #TODO: handle this properly end |