Class: Duby::AST::Noop

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

#[], #each, #expr?, #initialize, #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



117
118
119
120
# File 'lib/duby/compiler.rb', line 117

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

#infer(typer) ⇒ Object



26
27
28
# File 'lib/duby/ast/structure.rb', line 26

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