I'm currently implementing a different language (Shen) in Clojure.
Shen has a symbol "./" but in Clojure this is interpreted before evaluation and thus results in an error. I do not need "./" inside the macro which is compiling this function to Clojure code.
Is there a way to ignore this? I think it is interpreted as an qualified symbol but without a name, since replacing it by a/ or xyz/ results in the same error messages.
My current macro is as simple as
(defmacro kl/trap-error [x [y z r]] `(try ~x (catch Exception '~z ~r)))
But when I call it with Shen code the following happens:
kl=> (trap-error (/ 1 0) (./ E (error-to-string E)
RuntimeException Invalid token: ./ clojure.lang.Util.runtimeException (Util.java:156)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: E in this context, compiling:(NO_SOURCE_PATH:0)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: E in this context, compiling:(NO_SOURCE_PATH:89)
I hope someone can help me with this.
Thanks in advance.