Sha256: 305d9ad57759e189f9ea7202ad8526f36f548bf6a453404a29016cb6dd486fca
Contents?: true
Size: 503 Bytes
Versions: 13
Compression:
Stored size: 503 Bytes
Contents
# frozen_string_literal: true class Language class Atom class Then < Atom def initialize(parent:, block:) @parent = parent @block = block end def parse(parser) @parent.parse(parser) if parser.output.nil? parser.buffer = @block.call(parser.buffer) else parser.output = Output.from_raw(@block.call(parser.output.to_raw)) end end def to_s "(#{@parent}).then {}" end end end end
Version data entries
13 entries across 13 versions & 1 rubygems