Sha256: 0470887ab422b12771609b3a7c7eae102af567f171f3a03af99ff5a09a9ab731
Contents?: true
Size: 670 Bytes
Versions: 24
Compression:
Stored size: 670 Bytes
Contents
# frozen_string_literal: true require 'opal/rewriter' module Opal module Rewriters class BreakFinder < Opal::Rewriters::Base def initialize @found_break = false end def found_break? @found_break end def on_break(node) @found_break = true node end def stop_lookup(node) # noop end # regular loops alias on_for stop_lookup alias on_while stop_lookup alias on_while_post stop_lookup alias on_until stop_lookup alias on_until_post stop_lookup # nested block alias on_block stop_lookup end end end
Version data entries
24 entries across 24 versions & 1 rubygems