Module: Rattler::Compiler::ParserGenerator::Nested

Instance Method Summary collapse

Instance Method Details

#expr(type = :inline) ⇒ Object

:nodoc:



7
8
9
10
11
12
13
# File 'lib/rattler/compiler/parser_generator/nested.rb', line 7

def expr(type=:inline)
  if type == :inline
    @g.surround('(', ')') { yield }
  else
    @g.block('begin') { yield }
  end
end

#nested?Boolean

Returns:

  • (Boolean)


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

def nested?
  true
end