# File lib/treetop/compiler/ruby_builder.rb, line 15 def <<(ruby_line) return if ruby_line.blank? ruby << ruby_line.tabto(level) << "\n" end
# File lib/treetop/compiler/ruby_builder.rb, line 60 def accumulate(left, right) self << "#{left} << #{right}" end
# File lib/treetop/compiler/ruby_builder.rb, line 48 def assign(left, right) if left.instance_of? Array self << "#{left.join(', ')} = #{right.join(', ')}" else self << "#{left} = #{right}" end end
# File lib/treetop/compiler/ruby_builder.rb, line 86 def break self << 'break' end
# File lib/treetop/compiler/ruby_builder.rb, line 30 def class_declaration(name, &block) self << "class #{name}" indented(&block) self << "end" end
# File lib/treetop/compiler/ruby_builder.rb, line 74 def else_(&block) self << 'else' indented(&block) self << 'end' end
# File lib/treetop/compiler/ruby_builder.rb, line 56 def extend(var, module_name) self << "#{var}.extend(#{module_name})" end
# File lib/treetop/compiler/ruby_builder.rb, line 69 def if_(condition, &block) if__(condition, &block) self << 'end' end
# File lib/treetop/compiler/ruby_builder.rb, line 64 def if__(condition, &block) self << "if #{condition}" indented(&block) end
# File lib/treetop/compiler/ruby_builder.rb, line 90 def in(depth = 2) @level += depth self end
# File lib/treetop/compiler/ruby_builder.rb, line 24 def indented(depth = 2) self.in(depth) yield self.out(depth) end
# File lib/treetop/compiler/ruby_builder.rb, line 80 def loop(&block) self << 'loop do' indented(&block) self << 'end' end
# File lib/treetop/compiler/ruby_builder.rb, line 42 def method_declaration(name, &block) self << "def #{name}" indented(&block) self << "end" end
# File lib/treetop/compiler/ruby_builder.rb, line 36 def module_declaration(name, &block) self << "module #{name}" indented(&block) self << "end" end
# File lib/treetop/compiler/ruby_builder.rb, line 20 def newline ruby << "\n" end
# File lib/treetop/compiler/ruby_builder.rb, line 100 def next_address address_space.next_address end
Generated with the Darkfish Rdoc Generator 2.