Module: Rattler::BackEnd::ParserGenerator::ZeroOrMoreGenerating
- Defined in:
- lib/rattler/back_end/parser_generator/zero_or_more_generating.rb
Instance Method Summary collapse
-
#gen_assert(zero_or_more, scope = {}) ⇒ Object
:nodoc:.
- #gen_disallow(zero_or_more, scope = {}) ⇒ Object
- #gen_skip(zero_or_more, scope = {}) ⇒ Object
Instance Method Details
#gen_assert(zero_or_more, scope = {}) ⇒ Object
:nodoc:
7 8 9 |
# File 'lib/rattler/back_end/parser_generator/zero_or_more_generating.rb', line 7 def gen_assert(zero_or_more, scope={}) @g << 'true' end |
#gen_disallow(zero_or_more, scope = {}) ⇒ Object
11 12 13 |
# File 'lib/rattler/back_end/parser_generator/zero_or_more_generating.rb', line 11 def gen_disallow(zero_or_more, scope={}) @g << 'false' end |
#gen_skip(zero_or_more, scope = {}) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/rattler/back_end/parser_generator/zero_or_more_generating.rb', line 15 def gen_skip(zero_or_more, scope={}) expr :block do @g << 'while ' generate zero_or_more.child, :intermediate_skip, scope (@g << '; end').newline @g << 'true' end end |