2
votes

I'm trying to figure out where is the source code the defprotocol macro is defined.

in the cljs.core source:

https://github.com/clojure/clojurescript/blob/master/src/cljs/cljs/core.cljs

The defprotocol macros pops up suddenly on line 155 (along with the -invoke function). Where can we find where it is implemented?

1

1 Answers

2
votes

All macros in ClojureScript have to be implemented as Clojure.

The defprotocol is implemented at line 796 of this file:

https://github.com/clojure/clojurescript/blob/master/src/clj/cljs/core.clj#L796

Note that this file is a Clojure file, not a ClojureScript file.