Class: LibFST::Reader::Attribute

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Instance Attribute Details

#argInteger (readonly)

Returns:

  • (Integer)


81
82
83
# File 'lib/libfst/reader.rb', line 81

def arg
  @arg
end

#arg_from_nameInteger (readonly)

Returns:

  • (Integer)


82
83
84
# File 'lib/libfst/reader.rb', line 82

def arg_from_name
  @arg_from_name
end

#nameString (readonly)

Returns:

  • (String)


80
81
82
# File 'lib/libfst/reader.rb', line 80

def name
  @name
end

#subtypeSymbol (readonly)

When @type is

  • :misc: :comment, :envvar, :supvar, :pathname, :sourcestem, :sourceistem, :valuelist, :enumtable, :unknown
  • :array: :none, :unpacked, :packed or :sparse
  • :enum: :integer, :bit, :logic, :int, :shortint, :longint, :byte, :unsigned_integer, :unsigned_bit, :unsigned_logic, :unsigned_int, :unsigned_shortint, :unsigned_longint, :unsigned_byte, :reg or :time
  • :pack: :none, :unpacked, :packed or :tagged_packed

Returns:

  • (Symbol)


78
79
80
# File 'lib/libfst/reader.rb', line 78

def subtype
  @subtype
end

#typeSymbol (readonly)

Returns Either :misc, :array, :enum or :pack.

Returns:

  • (Symbol)

    Either :misc, :array, :enum or :pack



70
71
72
# File 'lib/libfst/reader.rb', line 70

def type
  @type
end

Instance Method Details

#to_sString

Returns:

  • (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