Class: LibFST::Reader::Attribute
- Inherits:
-
Object
- Object
- LibFST::Reader::Attribute
- Defined in:
- lib/libfst/reader.rb,
ext/libfst_rb.c
Overview
An attribute can provide additional information to a scope or a variable.
Attributes of #type :misc do not need a matching :attrend.
Instance Attribute Summary collapse
- #arg ⇒ Integer readonly
- #arg_from_name ⇒ Integer readonly
- #name ⇒ String readonly
-
#subtype ⇒ Symbol
readonly
When
@typeis - :misc::comment,:envvar,:supvar,:pathname,:sourcestem,:sourceistem,:valuelist,:enumtable,:unknown- :array::none,:unpacked,:packedor:sparse- :enum::integer,:bit,:logic,:int,:shortint,:longint,:byte,:unsigned_integer,:unsigned_bit,:unsigned_logic,:unsigned_int,:unsigned_shortint,:unsigned_longint,:unsigned_byte,:regor:time- :pack::none,:unpacked,:packedor:tagged_packed. -
#type ⇒ Symbol
readonly
Either
:misc,:array,:enumor:pack.
Instance Method Summary collapse
Instance Attribute Details
#arg ⇒ Integer (readonly)
81 82 83 |
# File 'lib/libfst/reader.rb', line 81 def arg @arg end |
#arg_from_name ⇒ Integer (readonly)
82 83 84 |
# File 'lib/libfst/reader.rb', line 82 def arg_from_name @arg_from_name end |
#name ⇒ String (readonly)
80 81 82 |
# File 'lib/libfst/reader.rb', line 80 def name @name end |
#subtype ⇒ Symbol (readonly)
When @type is
- :misc:
:comment,:envvar,:supvar,:pathname,:sourcestem,:sourceistem,:valuelist,:enumtable,:unknown - :array:
:none,:unpacked,:packedor:sparse - :enum:
:integer,:bit,:logic,:int,:shortint,:longint,:byte,:unsigned_integer,:unsigned_bit,:unsigned_logic,:unsigned_int,:unsigned_shortint,:unsigned_longint,:unsigned_byte,:regor:time - :pack:
:none,:unpacked,:packedor:tagged_packed
78 79 80 |
# File 'lib/libfst/reader.rb', line 78 def subtype @subtype end |
#type ⇒ Symbol (readonly)
Returns Either :misc, :array, :enum or :pack.
70 71 72 |
# File 'lib/libfst/reader.rb', line 70 def type @type end |
Instance Method Details
#to_s ⇒ String
94 95 96 |
# File 'lib/libfst/reader.rb', line 94 def to_s "<#{self.class.name} #{@name}, type: #{@type}, subtype: #{@subtype}, arg: #{@arg}, arg_from_name: #{@arg_from_name}>" end |