Class: SFRP::Flat::TConst

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#native_strObject

Returns the value of attribute native_str

Returns:

  • (Object)

    the current value of native_str



23
24
25
# File 'lib/sfrp/flat/elements.rb', line 23

def native_str
  @native_str
end

#pstrsObject

Returns the value of attribute pstrs

Returns:

  • (Object)

    the current value of pstrs



23
24
25
# File 'lib/sfrp/flat/elements.rb', line 23

def pstrs
  @pstrs
end

#spObject

Returns the value of attribute sp

Returns:

  • (Object)

    the current value of sp



23
24
25
# File 'lib/sfrp/flat/elements.rb', line 23

def sp
  @sp
end

#staticObject

Returns the value of attribute static

Returns:

  • (Object)

    the current value of static



23
24
25
# File 'lib/sfrp/flat/elements.rb', line 23

def static
  @static
end

#strObject

Returns the value of attribute str

Returns:

  • (Object)

    the current value of str



23
24
25
# File 'lib/sfrp/flat/elements.rb', line 23

def str
  @str
end

#vc_strsObject

Returns the value of attribute vc_strs

Returns:

  • (Object)

    the current value of vc_strs



23
24
25
# File 'lib/sfrp/flat/elements.rb', line 23

def vc_strs
  @vc_strs
end

Instance Method Details

#to_poly(_src_set, dest_set) ⇒ Object



28
29
30
31
# File 'lib/sfrp/flat/elements.rb', line 28

def to_poly(_src_set, dest_set)
  argc = pstrs.size
  dest_set << Poly::TConst.new(str, argc, vc_strs, static, native_str)
end

#type_annotObject



24
25
26
# File 'lib/sfrp/flat/elements.rb', line 24

def type_annot
  TypeAnnotationType.new(str, pstrs.map { |s| TypeAnnotationVar.new(s) })
end