Class: Opal::Rewriters::BreakFinder

Inherits:
Base
  • Object
show all
Defined in:
opal/lib/opal/rewriters/break_finder.rb

Constant Summary

Constants inherited from Base

Opal::Rewriters::Base::DUMMY_LOCATION

Instance Attribute Summary

Attributes inherited from Base

#current_node

Instance Method Summary collapse

Methods inherited from Base

#append_to_body, #prepend_to_body, #process, #s, s

Constructor Details

#initializeBreakFinder

Returns a new instance of BreakFinder



7
8
9
# File 'opal/lib/opal/rewriters/break_finder.rb', line 7

def initialize
  @found_break = false
end

Instance Method Details

#found_break?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'opal/lib/opal/rewriters/break_finder.rb', line 11

def found_break?
  @found_break
end

#on_break(node) ⇒ Object



15
16
17
18
# File 'opal/lib/opal/rewriters/break_finder.rb', line 15

def on_break(node)
  @found_break = true
  node
end

#stop_lookup(node) ⇒ Object Also known as: on_for, on_while, on_while_post, on_until, on_until_post, on_block



20
21
# File 'opal/lib/opal/rewriters/break_finder.rb', line 20

def stop_lookup(node)
end