Class: Stone::AST::TypeReference

Inherits:
Expression show all
Defined in:
lib/stone/ast/type_reference.rb

Instance Attribute Summary

Attributes inherited from Stone::AST

#children, #name

Instance Method Summary collapse

Constructor Details

#initializeTypeReference

Returns a new instance of TypeReference.



9
10
11
# File 'lib/stone/ast/type_reference.rb', line 9

def initialize
  @name = :type_reference
end

Instance Method Details

#to_llir(_builder, mod, _scope = Stone::Scope.top_level) ⇒ Object



17
18
19
20
# File 'lib/stone/ast/type_reference.rb', line 17

def to_llir(_builder, mod, _scope = Stone::Scope.top_level)
  # Return pointer to the Type type constant
  Stone::RTTI.type_constant_for(mod, Stone::Type::Type)
end

#to_sObject



22
23
24
# File 'lib/stone/ast/type_reference.rb', line 22

def to_s
  "Type"
end

#type(_context = nil) ⇒ Object



13
14
15
# File 'lib/stone/ast/type_reference.rb', line 13

def type(_context = nil)
  Stone::Type::Type
end