Sha256: bc08c710c0d2a3fb53f2a06ae62e32bffdc7364edaae3a0c771c367ac0b1c9b6
Contents?: true
Size: 616 Bytes
Versions: 14
Compression:
Stored size: 616 Bytes
Contents
# -*- encoding: utf-8 -*- module SXP; class Reader ## # An extended S-expression parser. class Extended < Basic LPARENS = [?(, ?[] RPARENS = [?), ?]] ATOM = /^[^\s()\[\]]+/ ## # @return [Object] def read_token case peek_char when ?[, ?] then [:list, read_char] else super end end ## # @return [void] def skip_comments until eof? case (char = peek_char).chr when /\s+/ then skip_char when /;/ then skip_line else break end end end end # Extended end; end # SXP::Reader
Version data entries
14 entries across 14 versions & 1 rubygems