Class: Rattler::Compiler::ParserGenerator::GroupMatchGenerator

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

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, #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



42
43
44
# File 'lib/rattler/compiler/parser_generator/group_match_generator.rb', line 42

def GroupMatchGenerator.nested(*args)
  NestedGroupMatchGenerator.new(*args)
end

.top_level(*args) ⇒ Object



52
53
54
# File 'lib/rattler/compiler/parser_generator/group_match_generator.rb', line 52

def GroupMatchGenerator.top_level(*args)
  TopLevelGroupMatchGenerator.new(*args)
end

Instance Method Details

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



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

def gen_basic(group_match, scope = ParserScope.empty)
  expr(:block) { gen_capture group_match, result_expr(group_match) }
end