Class: RLSL::Prism::IR::GlobalDecl

Inherits:
Node
  • Object
show all
Defined in:
lib/rlsl/prism/ir/definitions.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#type

Instance Method Summary collapse

Methods inherited from Node

#accept, visits

Constructor Details

#initialize(name, initializer, type: nil, is_const: false, is_static: true, array_size: nil, element_type: nil) ⇒ GlobalDecl

Returns a new instance of GlobalDecl.



12
13
14
15
16
17
18
19
20
21
# File 'lib/rlsl/prism/ir/definitions.rb', line 12

def initialize(name, initializer, type: nil, is_const: false, is_static: true, array_size: nil, element_type: nil)
  super()
  @name = name
  @initializer = initializer
  @type = type
  @is_const = is_const
  @is_static = is_static
  @array_size = array_size
  @element_type = element_type
end

Instance Attribute Details

#array_sizeObject

Returns the value of attribute array_size.



8
9
10
# File 'lib/rlsl/prism/ir/definitions.rb', line 8

def array_size
  @array_size
end

#element_typeObject

Returns the value of attribute element_type.



8
9
10
# File 'lib/rlsl/prism/ir/definitions.rb', line 8

def element_type
  @element_type
end

#initializerObject (readonly)

Returns the value of attribute initializer.



7
8
9
# File 'lib/rlsl/prism/ir/definitions.rb', line 7

def initializer
  @initializer
end

#is_constObject

Returns the value of attribute is_const.



8
9
10
# File 'lib/rlsl/prism/ir/definitions.rb', line 8

def is_const
  @is_const
end

#is_staticObject

Returns the value of attribute is_static.



8
9
10
# File 'lib/rlsl/prism/ir/definitions.rb', line 8

def is_static
  @is_static
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/rlsl/prism/ir/definitions.rb', line 7

def name
  @name
end