Sha256: a355b3961cb5e410825ae85ae9c1eaaa03b6a5adb5712b9b63b03dcde3982b4c
Contents?: true
Size: 492 Bytes
Versions: 69
Compression:
Stored size: 492 Bytes
Contents
module RubyToBlock module Block class ControlLoop < Base blocknize '^\s*loop\s+do\s*$', statement: true, indent: true def self.process_match_data(md, context) return false unless context.receiver do_block = Block.new('null') block = new(statements: { DO: do_block }) context.statement_stack.push([type, block]) context.current_block.sibling = block context.current_block = do_block true end end end end
Version data entries
69 entries across 69 versions & 1 rubygems