class Opal::Fragment
aka, source-maps!
mapping can be created of the original location => target location,
it was generated. Using this sexp, when writing fragments in order, a
to the destination. It also keeps hold of the original sexp from which
A fragment holds a string of generated javascript that will be written
def column
def column @sexp.column if @sexp end
def initialize(code, sexp = nil)
def initialize(code, sexp = nil) @code = code.to_s @sexp = sexp end
def inspect
def inspect "f(#{@code.inspect})" end
def line
def line @sexp.line if @sexp end
def to_code
def to_code if @sexp "/*:#{@sexp.line}:#{@sexp.column}*/#{@code}" else @code end end