Class: AdLint::Ld::VariableDeclaration
- Inherits:
-
Object
- Object
- AdLint::Ld::VariableDeclaration
- Includes:
- AdLint::LocationHolder
- Defined in:
- lib/adlint/ld/object.rb
Instance Method Summary collapse
- #eql?(rhs) ⇒ Boolean (also: #==)
- #extern? ⇒ Boolean
- #hash ⇒ Object
-
#initialize(gvar_dcl_rec) ⇒ VariableDeclaration
constructor
A new instance of VariableDeclaration.
- #location ⇒ Object
- #name ⇒ Object
- #type ⇒ Object
Methods included from AdLint::LocationHolder
Constructor Details
#initialize(gvar_dcl_rec) ⇒ VariableDeclaration
Returns a new instance of VariableDeclaration.
76 77 78 |
# File 'lib/adlint/ld/object.rb', line 76 def initialize(gvar_dcl_rec) @met_record = gvar_dcl_rec end |
Instance Method Details
#eql?(rhs) ⇒ Boolean Also known as: ==
96 97 98 |
# File 'lib/adlint/ld/object.rb', line 96 def eql?(rhs) name == rhs.name && location == rhs.location end |
#extern? ⇒ Boolean
92 93 94 |
# File 'lib/adlint/ld/object.rb', line 92 def extern? true end |
#hash ⇒ Object
102 103 104 |
# File 'lib/adlint/ld/object.rb', line 102 def hash "#{name} #{location}".hash end |
#location ⇒ Object
80 81 82 |
# File 'lib/adlint/ld/object.rb', line 80 def location @met_record.location end |
#name ⇒ Object
84 85 86 |
# File 'lib/adlint/ld/object.rb', line 84 def name @met_record.variable_name end |
#type ⇒ Object
88 89 90 |
# File 'lib/adlint/ld/object.rb', line 88 def type @met_record.type_rep end |