Class: SFRP::Raw::PrimTConst
- Inherits:
-
Struct
- Object
- Struct
- SFRP::Raw::PrimTConst
- Defined in:
- lib/sfrp/raw/elements.rb
Instance Attribute Summary collapse
-
#native_str ⇒ Object
Returns the value of attribute native_str.
-
#ns ⇒ Object
Returns the value of attribute ns.
-
#pat ⇒ Object
Returns the value of attribute pat.
-
#rep ⇒ Object
Returns the value of attribute rep.
-
#rname ⇒ Object
Returns the value of attribute rname.
-
#sp ⇒ Object
Returns the value of attribute sp.
Instance Method Summary collapse
- #absolute_name ⇒ Object
- #gen_flat(_src_set, dest_set) ⇒ Object
- #make_vconst(vconst_str) ⇒ Object
- #vconst_match?(vconst_str) ⇒ Boolean
Instance Attribute Details
#native_str ⇒ Object
Returns the value of attribute native_str
46 47 48 |
# File 'lib/sfrp/raw/elements.rb', line 46 def native_str @native_str end |
#ns ⇒ Object
Returns the value of attribute ns
46 47 48 |
# File 'lib/sfrp/raw/elements.rb', line 46 def ns @ns end |
#pat ⇒ Object
Returns the value of attribute pat
46 47 48 |
# File 'lib/sfrp/raw/elements.rb', line 46 def pat @pat end |
#rep ⇒ Object
Returns the value of attribute rep
46 47 48 |
# File 'lib/sfrp/raw/elements.rb', line 46 def rep @rep end |
#rname ⇒ Object
Returns the value of attribute rname
46 47 48 |
# File 'lib/sfrp/raw/elements.rb', line 46 def rname @rname end |
#sp ⇒ Object
Returns the value of attribute sp
46 47 48 |
# File 'lib/sfrp/raw/elements.rb', line 46 def sp @sp end |
Instance Method Details
#absolute_name ⇒ Object
47 48 49 |
# File 'lib/sfrp/raw/elements.rb', line 47 def absolute_name ns.absolute_name(rname) end |
#gen_flat(_src_set, dest_set) ⇒ Object
60 61 62 |
# File 'lib/sfrp/raw/elements.rb', line 60 def gen_flat(_src_set, dest_set) dest_set << Flat::TConst.new(absolute_name, [], nil, native_str, true, sp) end |
#make_vconst(vconst_str) ⇒ Object
55 56 57 58 |
# File 'lib/sfrp/raw/elements.rb', line 55 def make_vconst(vconst_str) raise vconst_str unless vconst_match?(vconst_str) VConst.new(vconst_str, rname, ns, vconst_str.gsub(pat, rep), [], sp) end |
#vconst_match?(vconst_str) ⇒ Boolean
51 52 53 |
# File 'lib/sfrp/raw/elements.rb', line 51 def vconst_match?(vconst_str) pat.match(vconst_str) end |