Sha256: 1d35e0682423c31de2d6f20f1dd42698daa888460a5ee1d09ee25ac0bcfe273f
Contents?: true
Size: 851 Bytes
Versions: 33
Compression:
Stored size: 851 Bytes
Contents
# frozen_string_literal: true class Code class Parser class List < Language def code Code end def code_present Code.new.present end def whitespace Whitespace end def whitespace? whitespace.maybe end def opening_square_bracket str("[") end def closing_square_bracket str("]") end def comma str(",") end def element (whitespace? << code_present << (whitespace? << comma.ignore).maybe) | (whitespace? << code << whitespace? << comma.ignore) end def root ( opening_square_bracket.ignore << whitespace? << element.repeat << (whitespace? << closing_square_bracket.ignore).maybe ).aka(:list) | String end end end end
Version data entries
33 entries across 33 versions & 1 rubygems