Class: Omnium::Parser::AST::VariableDeclaration
- Defined in:
- lib/omnium/parser/ast/variable_declaration.rb
Overview
Representative of the declaration of a variable, containing a reference to the variable identifier_node and it’s data type.
Instance Attribute Summary collapse
-
#data_type ⇒ Object
readonly
Returns the value of attribute data_type.
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
Instance Method Summary collapse
-
#initialize(identifier, data_type) ⇒ VariableDeclaration
constructor
A new instance of VariableDeclaration.
Constructor Details
#initialize(identifier, data_type) ⇒ VariableDeclaration
Returns a new instance of VariableDeclaration.
11 12 13 14 |
# File 'lib/omnium/parser/ast/variable_declaration.rb', line 11 def initialize(identifier, data_type) @identifier = identifier @data_type = data_type end |
Instance Attribute Details
#data_type ⇒ Object (readonly)
Returns the value of attribute data_type.
9 10 11 |
# File 'lib/omnium/parser/ast/variable_declaration.rb', line 9 def data_type @data_type end |
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
9 10 11 |
# File 'lib/omnium/parser/ast/variable_declaration.rb', line 9 def identifier @identifier end |