aboutsummaryrefslogtreecommitdiff
path: root/ruby/reader.rb
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2015-01-02 23:33:50 -0600
committerJoel Martin <github@martintribe.org>2015-01-09 16:16:55 -0600
commit96f1845afdb816515bba83ad4bb8fee6bc466557 (patch)
tree6fd8d7949ba26863d17122160a488db216fd1b81 /ruby/reader.rb
parentf522319598c701efde91a78b07110d7039a8c906 (diff)
downloadmal-96f1845afdb816515bba83ad4bb8fee6bc466557.tar.gz
mal-96f1845afdb816515bba83ad4bb8fee6bc466557.zip
Misc cleanup. Move *host-language* to stepA.
Diffstat (limited to 'ruby/reader.rb')
-rw-r--r--ruby/reader.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/ruby/reader.rb b/ruby/reader.rb
index eb9ae7b..641e65c 100644
--- a/ruby/reader.rb
+++ b/ruby/reader.rb
@@ -31,7 +31,7 @@ def read_atom(rdr)
return case token
when /^-?[0-9]+$/ then token.to_i # integer
when /^-?[0-9][0-9.]*$/ then token.to_f # float
- when /^"/ then parse_str(token) # string
+ when /^".*"$/ then parse_str(token) # string
when /^:/ then "\u029e" + token[1..-1] # keyword
when "nil" then nil
when "true" then true
@@ -57,7 +57,6 @@ def read_list(rdr, klass, start="(", last =")")
end
def read_form(rdr)
- token = rdr.peek
return case rdr.peek
when ";" then nil
when "'" then rdr.next; List.new [:quote, read_form(rdr)]