CLJS: syntax-quote doesn't auto-qualify symbols

Description

If x resolves to cljs.user/x then read-string on "`x" should result in the cljs.user namespace being incorporated in the result.

For example, testing using the Node REPL that ships with ClojureScript:

The result should instead be

Environment

None

Activity

Show:
Mike Fikes
January 4, 2016, 3:18 AM

Analysis: resolve-symbol should be called in the syntax-quote* cond branch dealing with symbol?. (just as is done in the CLJ implementation).

Mike Fikes
January 4, 2016, 3:23 AM

The attached unit test causes unit tests to pass.

Additionally, it works properly downstream with the Planck bootstrapped ClojureScript REPL, producing the expected output for the syntax quote examples in Colin Jones's post: https://blog.8thlight.com/colin-jones/2012/05/22/quoting-without-confusion.html

Nicola Mometto
January 4, 2016, 2:23 PM

Thanks, pushed a fix

Completed

Assignee

Nicola Mometto

Reporter

Mike Fikes

Labels

None

Approval

None

Patch

Code and Test

Priority

Major