Class: Duby::AST::Noop

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

Instance Attribute Summary

Attributes inherited from Node

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

Instance Method Summary collapse

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::Node

Instance Method Details

#compile(compiler, expression) ⇒ Object



169
170
171
172
# File 'lib/duby/compiler.rb', line 169

def compile(compiler, expression)
  # TODO: what does it mean for a noop to be an expression
  # nothing
end

#infer(typer) ⇒ Object



122
123
124
125
# File 'lib/duby/ast/structure.rb', line 122

def infer(typer)
  resolved!
  @inferred_type ||= typer.no_type
end