Class: Lignite::Never

Inherits:
Condition show all
Defined in:
lib/lignite/condition.rb

Overview

A condition that is never true

Instance Method Summary collapse

Methods inherited from Condition

#jump_back, #jump_forward

Instance Method Details

#cond_jump(compiler, _offset) ⇒ Object



48
49
50
51
52
# File 'lib/lignite/condition.rb', line 48

def cond_jump(compiler, _offset)
  # Never jump: do a jump of size 0
  # but it must be a jump because code size calculations need that
  compiler.jr(JumpOffset.new(0))
end

#notObject



44
45
46
# File 'lib/lignite/condition.rb', line 44

def not
  Always.new
end