class Opal::Sexp


s(:array, s(:int, 1), s(:int, 2))
For example, an array of integers ‘[1, 2]` might be represented by:
compiler then steps through the sexp trees to generate the javascript code.<br> is used to build up the syntax tree inside [Opal::Parser]. The

def <<(other)

def <<(other)
  @array << other
  self
end

def ==(other)

def ==(other)
  if other.is_a? Sexp
    @array == other.array
  else
    @array == other
  end
end

def children

def children
  @array[1..-1]
end

def column

def column
  @source && @source[1]
end

def dup

def dup
  Sexp.new(@array.dup)
end

def initialize(args)

def initialize(args)
  @array = args
end

def inspect

def inspect
  "(#{@array.map { |e| e.inspect }.join ', '})"
end

def line

def line
  @source && @source[0]
end

def method_missing(sym, *args, &block)

def method_missing(sym, *args, &block)
  @array.send sym, *args, &block
end

def pretty_inspect

def pretty_inspect
  "(#{line ? "#{line} " : ''}#{@array.map { |e| e.inspect }.join ', '})"
end

def push(*parts)

def push(*parts)
  @array.push(*parts)
  self
end

def to_ary

def to_ary
  @array
end

def type

def type
  @array[0]
end

def type=(type)

def type=(type)
  @array[0] = type
end