Class: SFRP::Raw::Init

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#arg_expsObject

Returns the value of attribute arg_exps

Returns:

  • (Object)

    the current value of arg_exps



65
66
67
# File 'lib/sfrp/raw/elements.rb', line 65

def arg_exps
  @arg_exps
end

#func_refObject

Returns the value of attribute func_ref

Returns:

  • (Object)

    the current value of func_ref



65
66
67
# File 'lib/sfrp/raw/elements.rb', line 65

def func_ref
  @func_ref
end

#line_numberObject

Returns the value of attribute line_number

Returns:

  • (Object)

    the current value of line_number



65
66
67
# File 'lib/sfrp/raw/elements.rb', line 65

def line_number
  @line_number
end

#nsObject

Returns the value of attribute ns

Returns:

  • (Object)

    the current value of ns



65
66
67
# File 'lib/sfrp/raw/elements.rb', line 65

def ns
  @ns
end

Instance Method Details

#func_rnameObject



66
67
68
# File 'lib/sfrp/raw/elements.rb', line 66

def func_rname
  "%init#{line_number}"
end

#functionObject



70
71
72
73
# File 'lib/sfrp/raw/elements.rb', line 70

def function
  exp = FuncCallExp.new(func_ref, arg_exps, true)
  Function.new(func_rname, ns, nil, [], [], exp, nil, true)
end

#gen_flat(src_set, dest_set) ⇒ Object



75
76
77
78
# File 'lib/sfrp/raw/elements.rb', line 75

def gen_flat(src_set, dest_set)
  function.gen_flat(src_set, dest_set)
  dest_set.append_init_func_str(function.absolute_name)
end