class Rattler::Compiler::Optimizer::FlattenMatchingSequence
Nested sequence expressions can be flattened without affecting how they match.
Protected Instance Methods
_applies_to?(parser, context)
click to toggle source
Calls superclass method
# File lib/rattler/compiler/optimizer/flatten_sequence.rb, line 13 def _applies_to?(parser, context) context.matching? and parser.is_a?(Sequence) and super end
eligible_child?(child)
click to toggle source
# File lib/rattler/compiler/optimizer/flatten_sequence.rb, line 19 def eligible_child?(child) child.is_a? Sequence end