Class: PseudoHiki::BlockParser::ListTypeLeaf

Inherits:
NestedBlockLeaf show all
Includes:
BlockElement
Defined in:
lib/pseudohiki/blockparser.rb,
lib/pseudohiki/blockparser.rb

Constant Summary collapse

WRAPPER =
{
  ListLeaf => ListWrapNode,
  EnumLeaf => EnumWrapNode
}

Instance Attribute Summary

Attributes inherited from BlockLeaf

#level, #node_id

Instance Method Summary collapse

Methods inherited from NestedBlockLeaf

create, with_depth?

Methods inherited from BlockLeaf

#block, create, #head_re, #parse_leafs, #push_block, #under_appropriate_block?, with_depth?

Instance Method Details

#push_self(stack) ⇒ Object



259
260
261
262
263
264
# File 'lib/pseudohiki/blockparser.rb', line 259

def push_self(stack)
  push_block(stack) unless under_appropriate_block?(stack)
  stack.push WRAPPER[self.class].new
  BlockParser.assign_node_id(self[0], stack.current_node)
  stack.push_as_leaf self
end