Class: Brainfuck::AST::IncNode

Inherits:
Object
  • Object
show all
Defined in:
lib/brainfuck/ast.rb

Instance Method Summary collapse

Instance Method Details

#bytecode(g) ⇒ Object



57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/brainfuck/ast.rb', line 57

def bytecode(g)
  g.push_local 0
  g.push_local 1

  g.dup_many(2)
  g.send :[], 1, false
  g.meta_push_1
  g.meta_send_op_plus 0

  g.send :[]=, 2, false
  g.pop
end