Class: Rattler::Compiler::ParserGenerator::SkipGenerator

Inherits:
ExprGenerator
  • Object
show all
Includes:
PredicatePropogating, SkipPropogating, TokenPropogating
Defined in:
lib/rattler/compiler/parser_generator/skip_generator.rb

Direct Known Subclasses

NestedSkipGenerator, TopLevelSkipGenerator

Class Method Summary collapse

Instance Method Summary collapse

Methods included from SkipPropogating

#gen_intermediate_skip, #gen_skip

Methods included from TokenPropogating

#gen_token

Methods included from PredicatePropogating

#gen_assert, #gen_disallow, #gen_intermediate_assert, #gen_intermediate_disallow

Methods inherited from ExprGenerator

#gen_intermediate_assert, #gen_intermediate_disallow, #gen_intermediate_skip, #gen_token, #initialize

Constructor Details

This class inherits a constructor from Rattler::Compiler::ParserGenerator::ExprGenerator

Class Method Details

.nested(*args) ⇒ Object



27
28
29
# File 'lib/rattler/compiler/parser_generator/skip_generator.rb', line 27

def SkipGenerator.nested(*args)
  NestedSkipGenerator.new(*args)
end

.top_level(*args) ⇒ Object



37
38
39
# File 'lib/rattler/compiler/parser_generator/skip_generator.rb', line 37

def SkipGenerator.top_level(*args)
  TopLevelSkipGenerator.new(*args)
end

Instance Method Details

#gen_basic(skip, scope = ParserScope.empty) ⇒ Object



11
12
13
# File 'lib/rattler/compiler/parser_generator/skip_generator.rb', line 11

def gen_basic(skip, scope = ParserScope.empty)
  generate skip.child, :skip, scope
end

#gen_intermediate(skip, scope = ParserScope.empty) ⇒ Object



15
16
17
# File 'lib/rattler/compiler/parser_generator/skip_generator.rb', line 15

def gen_intermediate(skip, scope = ParserScope.empty)
  gen_intermediate_skip skip, scope
end