Class: Opal::Rewriters::BreakFinder
- 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
Instance Method Summary collapse
- #found_break? ⇒ Boolean
-
#initialize ⇒ BreakFinder
constructor
A new instance of BreakFinder.
- #on_break(node) ⇒ Object
- #stop_lookup(node) ⇒ Object (also: #on_for, #on_while, #on_while_post, #on_until, #on_until_post, #on_block)
Methods inherited from Base
#append_to_body, #prepend_to_body, #process, #s, s
Constructor Details
#initialize ⇒ BreakFinder
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
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 |