class Atomy::Code::List

Public Class Methods

new(elements) click to toggle source
# File lib/atomy/code/list.rb, line 4
def initialize(elements)
  @elements = elements
end

Public Instance Methods

bytecode(gen, mod) click to toggle source
# File lib/atomy/code/list.rb, line 8
def bytecode(gen, mod)
  @elements.each do |e|
    mod.compile(gen, e)
  end

  gen.make_array(@elements.size)
end