Module: Rattler::Compiler::ParserGenerator::List0Generating
- Defined in:
- lib/rattler/compiler/parser_generator/list0_generating.rb
Instance Method Summary collapse
-
#gen_assert(optional, scope = ParserScope.empty) ⇒ Object
:nodoc:.
- #gen_disallow(optional, scope = ParserScope.empty) ⇒ Object
- #gen_skip(list, scope = ParserScope.empty) ⇒ Object
Instance Method Details
#gen_assert(optional, scope = ParserScope.empty) ⇒ Object
:nodoc:
7 8 9 |
# File 'lib/rattler/compiler/parser_generator/list0_generating.rb', line 7 def gen_assert(optional, scope = ParserScope.empty) @g << 'true' end |
#gen_disallow(optional, scope = ParserScope.empty) ⇒ Object
11 12 13 |
# File 'lib/rattler/compiler/parser_generator/list0_generating.rb', line 11 def gen_disallow(optional, scope = ParserScope.empty) @g << 'false' end |
#gen_skip(list, scope = ParserScope.empty) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/rattler/compiler/parser_generator/list0_generating.rb', line 15 def gen_skip(list, scope = ParserScope.empty) expr :block do gen_skipping list, scope @g << "@scanner.pos = #{end_pos_name} unless #{end_pos_name}.nil?" @g.newline << 'true' end end |