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, #begin_with_stmts, #error, #prepend_to_body, #process, #s, s, #stmts_of
Constructor Details
#initialize ⇒ BreakFinder
Returns a new instance of BreakFinder.
8 9 10 |
# File 'opal/lib/opal/rewriters/break_finder.rb', line 8 def initialize @found_break = false end |
Instance Method Details
#found_break? ⇒ Boolean
12 13 14 |
# File 'opal/lib/opal/rewriters/break_finder.rb', line 12 def found_break? @found_break end |
#on_break(node) ⇒ Object
16 17 18 19 |
# File 'opal/lib/opal/rewriters/break_finder.rb', line 16 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
21 22 23 |
# File 'opal/lib/opal/rewriters/break_finder.rb', line 21 def stop_lookup(node) # noop end |