Class: SFRP::Raw::Output

Inherits:
Struct
  • Object
show all
Defined in:
lib/sfrp/raw/elements.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#expsObject

Returns the value of attribute exps

Returns:

  • (Object)

    the current value of exps



99
100
101
# File 'lib/sfrp/raw/elements.rb', line 99

def exps
  @exps
end

#func_refObject

Returns the value of attribute func_ref

Returns:

  • (Object)

    the current value of func_ref



99
100
101
# File 'lib/sfrp/raw/elements.rb', line 99

def func_ref
  @func_ref
end

#line_numberObject

Returns the value of attribute line_number

Returns:

  • (Object)

    the current value of line_number



99
100
101
# File 'lib/sfrp/raw/elements.rb', line 99

def line_number
  @line_number
end

#nsObject

Returns the value of attribute ns

Returns:

  • (Object)

    the current value of ns



99
100
101
# File 'lib/sfrp/raw/elements.rb', line 99

def ns
  @ns
end

#spObject

Returns the value of attribute sp

Returns:

  • (Object)

    the current value of sp



99
100
101
# File 'lib/sfrp/raw/elements.rb', line 99

def sp
  @sp
end

Instance Method Details

#absolute_nameObject



104
105
106
# File 'lib/sfrp/raw/elements.rb', line 104

def absolute_name
  ns.absolute_name(rname)
end

#convertObject



108
109
110
111
112
# File 'lib/sfrp/raw/elements.rb', line 108

def convert
  exp = FuncCallExp.new(func_ref, exps, false, sp)
  ta = TypeAnnotationType.new(Ref.new('Unit'), [])
  Node.new(rname, ns, ta, exp, nil, sp)
end

#rnameObject



100
101
102
# File 'lib/sfrp/raw/elements.rb', line 100

def rname
  "%output_line#{line_number}"
end