class Ikra::AST::BehaviorNode

Public Instance Methods

find_behavior_node() click to toggle source
# File lib/ast/nodes.rb, line 138
def find_behavior_node
    return self
end
get_type() click to toggle source
# File lib/types/inference/ast_inference.rb, line 80
def get_type
    @type ||= Types::UnionType.new
end
lexical_variables_names_and_types() click to toggle source

Mapping: lexical variable name -> UnionType

# File lib/types/inference/ast_inference.rb, line 104
def lexical_variables_names_and_types
    @lexical_variables_names_and_types ||= {}
end
local_variables_names_and_types() click to toggle source

Mapping: local variable name -> UnionType

# File lib/types/inference/ast_inference.rb, line 109
def local_variables_names_and_types
    @local_variables_names_and_types ||= {}
end
local_variables_names_and_types=(value) click to toggle source
# File lib/types/inference/ast_inference.rb, line 113
def local_variables_names_and_types=(value)
    @local_variables_names_and_types = value
end
merge_union_type(union_type) click to toggle source
# File lib/types/inference/ast_inference.rb, line 84
def merge_union_type(union_type)
    type = @type ||= Types::UnionType.new

    if not @type.include_all?(union_type)
        register_type_change
    end
    
    return type.expand_return_type(union_type).dup
end
parameters_names_and_types() click to toggle source

Mapping: parameter name -> UnionType

# File lib/types/inference/ast_inference.rb, line 95
def parameters_names_and_types
    @parameters_names_and_types ||= {}
end
parameters_names_and_types=(value) click to toggle source
# File lib/types/inference/ast_inference.rb, line 99
def parameters_names_and_types=(value)
    @parameters_names_and_types = value
end
register_type_change() click to toggle source
# File lib/types/inference/ast_inference.rb, line 129
def register_type_change
    @types_changed = true
end
reset_types_changed() click to toggle source
# File lib/types/inference/ast_inference.rb, line 125
def reset_types_changed
    @types_changed = false
end
symbol_table() click to toggle source
# File lib/types/inference/ast_inference.rb, line 117
def symbol_table
    @symbol_table ||= TypeInference::SymbolTable.new
end
types_changed?() click to toggle source
# File lib/types/inference/ast_inference.rb, line 121
def types_changed?
    return @types_changed ||= false
end