Details
-
Type:
Defect
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
I've made it so macro expansion stops when expansion does not differ from source form. This combined with the fact that we have separate Clojure namespaces for macros means that ordinary macros can act as compiler macros in cljs. Just define a macro with the same name as the function.
Note that you will need the complete definition of the function as well - it will be used when the function is used as a value, or via some alias. The macro will only come into play when compiler sees call by original name.
Try this on e.g. * and report back.
Imported from github issue #15
I've started on this, https://github.com/clojure/clojurescript/tree/4-math-op-macros. Seems to works as advertised, however for some reason function printing gets borked.