class SXP::Reader::Extended
An extended S-expression parser.
Constants
- ATOM
- LPARENS
- RPARENS
Public Instance Methods
read_token()
click to toggle source
@return [Object]
Calls superclass method
SXP::Reader::Basic#read_token
# File lib/sxp/reader/extended.rb, line 11 def read_token case peek_char when ?[, ?] then [:list, read_char] else super end end
skip_comments()
click to toggle source
@return [void]
# File lib/sxp/reader/extended.rb, line 20 def skip_comments until eof? case (char = peek_char).chr when /\s+/ then skip_char when /;/ then skip_line else break end end end