lib/sxp/reader/basic.rb in sxp-0.0.5 vs lib/sxp/reader/basic.rb in sxp-0.0.6
- old
+ new
@@ -12,11 +12,11 @@
##
# @return [Object]
def read_token
case peek_char
when ?(, ?) then [:list, read_char]
- when ?" then [:atom, read_string]
+ when ?" then [:atom, read_string] #"
else super
end
end
##
@@ -34,11 +34,11 @@
##
# @return [String]
def read_string
buffer = String.new
skip_char # '"'
- until peek_char == ?"
+ until peek_char == ?" #"
buffer <<
case char = read_char
when ?\\ then read_character
else char
end
@@ -56,11 +56,11 @@
when ?n then ?\n
when ?r then ?\r
when ?t then ?\t
when ?u then read_chars(4).to_i(16).chr
when ?U then read_chars(8).to_i(16).chr
- when ?" then char
+ when ?" then char #"
when ?\\ then char
else char
end
end
@@ -70,7 +70,7 @@
grammar = self.class.const_get(:ATOM)
buffer = String.new
buffer << read_char while !eof? && peek_char.chr =~ grammar
buffer
end
- end # class Reader
+ end # class Basic
end; end # class SXP::Reader