class Rattler::Compiler::Optimizer::FlattenChoice
Nested choice expressions can be flattened without affecting how they parse.
Protected Instance Methods
_applies_to?(parser, context)
click to toggle source
Calls superclass method
# File lib/rattler/compiler/optimizer/flatten_choice.rb, line 13 def _applies_to?(parser, context) parser.is_a?(Choice) and super end
eligible_child?(child)
click to toggle source
# File lib/rattler/compiler/optimizer/flatten_choice.rb, line 17 def eligible_child?(child) child.is_a? Choice end