Sha256: cc6f84e36c6f26cbe91dfc45f04b131b9a75cad815c9b3f9634447371b27dcb8
Contents?: true
Size: 736 Bytes
Versions: 11
Compression:
Stored size: 736 Bytes
Contents
# frozen_string_literal: true class Code class Parser class List < Language def code 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 code end def root ( opening_square_bracket.ignore << whitespace? << (whitespace? << element << (whitespace? << comma).maybe).repeat << (whitespace? << closing_square_bracket.ignore).maybe ).aka(:list) | String end end end end
Version data entries
11 entries across 11 versions & 1 rubygems