From 5a33a64f091ce4f8cf8c6caa59219328810b2975 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Sat, 9 Aug 2014 05:03:46 -0700 Subject: [PATCH] Created Debugging the compiler (markdown) --- Debugging-the-compiler.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Debugging-the-compiler.md diff --git a/Debugging-the-compiler.md b/Debugging-the-compiler.md new file mode 100644 index 0000000..0f40974 --- /dev/null +++ b/Debugging-the-compiler.md @@ -0,0 +1,11 @@ +```nimrod +echo renderTree(someNode) # pretty prints the nimrod ast +debug(someNode) # outputs some JSON representation +echo typeToString(someType) # pretty prints some type +debug(someType) +echo symbol.name.s +debug(symbol) +echo renderTree(someNode, {renderIds}) # pretty prints the nimrod ast, but annotates symbol IDs +if n.info ?? "temp.nim": echo renderTree(n) # only output when it comes from "temp.nim" +if n.info ?? "temp.nim": writeStackTrace() # why the fuck does it process temp.nim here? +``` \ No newline at end of file