Class: Lydown::Parsing::Repeat::Start
- Inherits:
-
Lydown::Parsing::Root
- Object
- Treetop::Runtime::SyntaxNode
- Lydown::Parsing::Root
- Lydown::Parsing::Repeat::Start
- Defined in:
- lib/lydown/parsing/nodes.rb
Instance Method Summary collapse
Methods inherited from Lydown::Parsing::Root
Methods included from Lydown::Parsing::RootMethods
#_to_stream, #add_event, #each_child, #event_hash
Constructor Details
This class inherits a constructor from Lydown::Parsing::Root
Instance Method Details
#to_stream(stream, opts) ⇒ Object
424 425 426 427 428 429 430 431 |
# File 'lib/lydown/parsing/nodes.rb', line 424 def to_stream(stream, opts) ref = {type: :repeat_start, raw: text_value, count: 2} if text_value =~ /(\d+)$/ ref[:count] = $1.to_i end stream << event_hash(stream, opts, ref) end |