Class: Pegex::Tree::Wrap

Inherits:
Pegex::Tree show all
Defined in:
lib/pegex/tree/wrap.rb

Instance Attribute Summary

Attributes inherited from Receiver

#parser

Instance Method Summary collapse

Methods inherited from Receiver

#flatten

Instance Method Details

#final(got) ⇒ Object



10
11
12
# File 'lib/pegex/tree/wrap.rb', line 10

def final got
  return got || {@parser.rule => []}
end

#gotrule(got) ⇒ Object



4
5
6
7
8
# File 'lib/pegex/tree/wrap.rb', line 4

def gotrule got
  return got || Pegex::Constant::Null if @parser.parent['-pass']
  return Pegex::Constant::Null unless got
  return @parser.rule => got
end