Class: Mirah::AST::Include
- Includes:
- Scoped
- Defined in:
- lib/mirah/ast/class.rb,
lib/mirah/compiler/class.rb
Instance Attribute Summary
Attributes inherited from Node
#children, #inferred_type, #newline, #parent, #position
Instance Method Summary collapse
Methods included from Scoped
Methods inherited from Node
#<<, ===, #[], #[]=, #_dump, _load, #_set_parent, child, child_name, #child_nodes, #each, #empty?, #expr?, #inferred_type!, #initialize, #initialize_copy, #insert, #inspect, #inspect_children, #line_number, #log, #precompile, #resolve_if, #resolved!, #resolved?, #simple_name, #string_value, #temp, #to_s, #top_level?, #validate_child, #validate_children
Constructor Details
This class inherits a constructor from Mirah::AST::Node
Instance Method Details
#compile(compiler, expression) ⇒ Object
67 |
# File 'lib/mirah/compiler/class.rb', line 67 def compile(compiler, expression); end |
#infer(typer, expression) ⇒ Object
311 312 313 314 315 316 317 |
# File 'lib/mirah/ast/class.rb', line 311 def infer(typer, expression) children.each do |type| typeref = type.type_reference(typer) the_scope = scope.static_scope the_scope.self_type = the_scope.self_type.include(typeref) end end |