Class: Yaparc::AbstractParser
- Inherits:
-
Object
- Object
- Yaparc::AbstractParser
- Includes:
- Parsable
- Defined in:
- lib/yaparc.rb
Constant Summary
Constants included from Parsable
Parsable::IS_ALPHANUM, Parsable::IS_CR, Parsable::IS_DIGIT, Parsable::IS_LOWER, Parsable::IS_SPACE, Parsable::IS_WHITESPACE
Instance Attribute Summary
Attributes included from Parsable
Instance Method Summary collapse
-
#parse(input, &block) ⇒ Object
def parse(input, &block) tree = @parser.call.parse(input) if block_given? yield tree else tree end end.
Instance Method Details
#parse(input, &block) ⇒ Object
def parse(input, &block)
tree = @parser.call.parse(input)
if block_given?
yield tree
else
tree
end
end
603 604 605 606 607 608 609 610 |
# File 'lib/yaparc.rb', line 603 def parse(input, &block) tree = @parser.call.parse(input) if block_given? @tree = yield tree else @tree = tree end end |