lib/rouge/reader.rb in rouge-lang-0.0.1 vs lib/rouge/reader.rb in rouge-lang-0.0.2

- old
+ new

@@ -162,11 +162,11 @@ end def syntaxquotation consume @gensyms.unshift(@@gensym_counter += 1) - r = dequote lex + r = dequote(lex) @gensyms.shift r end def dequotation @@ -179,11 +179,11 @@ end end def dequote form case form - when Rouge::Seq::Cons, Array + when Rouge::Seq::ISeq, Array rest = [] group = [] form.each do |f| if f.is_a? Rouge::Splice if group.length > 0 @@ -231,11 +231,11 @@ Rouge::Seq::Cons[Rouge::Symbol[:quote], form] elsif form.ns.nil? begin var = @ns[form.name] Rouge::Seq::Cons[Rouge::Symbol[:quote], - Rouge::Symbol[var.name]] + Rouge::Symbol[:"#{var.ns}/#{var.name}"]] rescue Rouge::Namespace::VarNotFoundError Rouge::Seq::Cons[Rouge::Symbol[:quote], Rouge::Symbol[:"#{@ns.name}/#{form.name}"]] end else @@ -425,9 +425,9 @@ | (?:0\d+) (?# Octal integer) | (?:#{INT}(?:(?:\.#{INT})?(?:[eE][+-]?#{INT})?)?) (?# Integers and floats) )\z /ox - SYMBOL = /^(\.\[\])|([a-zA-Z0-9\-_!&\?\*\/\.\+\|=%$<>#]+)/ + SYMBOL = /^(\.\[\])|(\.?[-+]@)|([a-zA-Z0-9\-_!&\?\*\/\.\+\|=%$<>#]+)/ end # vim: set sw=2 et cc=80: