View Source mix compile.dispatch (DispatchEx v0.1.2)

Consolidate protocols dispatch

This does NOT use the elixir defprotocol functionality but instead builds a dispatch table based soly on pattern matching. The purpose beeing a more flexible dispatch built at compile time.

Loads all the project files and their dependencies before scanning for the Dispatch behaviour. The modules implementing the protocol is parsed for their AST which the compiler merges with the original source file. The result is a single consolidated file with all the function clauses for the dispatch. The imlementing beam file may be discarded as it is not used.