Class: Duby::AST::ScopedBody

Inherits:
Body
  • Object
show all
Includes:
Scope
Defined in:
lib/duby/compiler.rb,
lib/duby/ast/structure.rb

Instance Attribute Summary

Attributes included from Scope

#static_scope

Attributes inherited from Node

#children, #inferred_type, #newline, #parent, #position

Instance Method Summary collapse

Methods inherited from Body

#expr?, #infer, #initialize

Methods inherited from Node

#<<, ===, #[], #_set_parent, child, child_name, #each, #empty?, #expr?, #initialize, #initialize_copy, #insert, #inspect, #line_number, #log, #precompile, #resolve_if, #resolved!, #resolved?, #simple_name, #temp, #to_s

Constructor Details

This class inherits a constructor from Duby::AST::Body

Instance Method Details

#compile(compiler, expression) ⇒ Object



76
77
78
79
# File 'lib/duby/compiler.rb', line 76

def compile(compiler, expression)
  compiler.line(line_number)
  compiler.scoped_body(self, expression)
end