Sha256: 5b96b089a66d48da58be39409610591fdc7b870f6fa6f744705a05ea12fa5ac2
Contents?: true
Size: 584 Bytes
Versions: 15
Compression:
Stored size: 584 Bytes
Contents
# frozen_string_literal: true class Language class Atom class Absent < Atom def initialize(parent: nil) @parent = parent end def parse(parser) clone = Parser.new( root: self, input: parser.input, cursor: parser.cursor, buffer: parser.buffer ) @parent&.parse(clone) rescue Parser::Interuption else raise Parser::Interuption.new(parser, self) end def to_s @parent ? "(#{@parent}).absent" : "absent" end end end end
Version data entries
15 entries across 15 versions & 1 rubygems