Permalink
Browse files

Fix handling of specials

  • Loading branch information...
1 parent 435e34f commit f194cb1e429923a68d3e3a9cc4ec25f0f833b838 @brandonbloom committed Feb 19, 2013
Showing with 8 additions and 5 deletions.
  1. +3 −2 src/backtick.clj
  2. +5 −3 test/backtick_test.clj
View
@@ -91,8 +91,9 @@
resolve-symbol
name
(str ".")))
- (if (re-find #"^\." nm)
- sym ; method name
+ (if (or (special-symbol? sym)
+ (re-find #"^\." nm)) ; method name
+ sym
(or (ns-resolve-sym sym)
(symbol (namespace-name *ns*) nm))))
(or (ns-resolve-sym sym) sym))))
View
@@ -36,7 +36,7 @@
(is (= (R. 1) (template #backtick_test.R{:x 1})))))
(deftest syntax-quote-test
- (testing "Constructors, classes, methods, and vars"
+ (testing "Constructors, classes, methods, vars, and specials"
(is (= (syntax-quote
[Class
Class.
@@ -46,7 +46,8 @@
fully/qualified
.method
inc
- backtick.test/inc])
+ backtick.test/inc
+ quote])
`[Class
Class.
java.lang.Class
@@ -55,5 +56,6 @@
fully/qualified
.method
inc
- backtick.test/inc]))))
+ backtick.test/inc
+ quote]))))

0 comments on commit f194cb1

Please sign in to comment.