Thanks. For this particular example, I've started looking at how static generic 
expressions are handled by procs and templates into `semtypes.nim`.

But the question wanted to be more general. How a new comer can understand how 
the Nim compiler works? What tools/options are available to have a global 
understanding of the compilation process? Are there ways to see the results of 
the different compilation phases? I've listed 2 undocumented options to see the 
scan and parser phases, but after the AST is built there are many phases when 
the AST is reworked before code generation. What are the important internal 
data structures?

Is there a wish to build a compiler's internals documentation or is it a 
knowledge that lives in the compiler hackers' minds?

Reply via email to