diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2020-11-14 13:00:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-14 13:00:06 +0100 |
commit | 1978b9120250f69df20a5bbb2cb11e73cd3eae5a (patch) | |
tree | 1f5440f3f082023ba7f6fcc4df4b04e7c562a850 | |
parent | 47ce24f680dbf5aed8cd393f011739ea5d7a9928 (diff) | |
parent | bfa387d384762cf0b46431407669ec1889b8c4a3 (diff) | |
download | Nim-1978b9120250f69df20a5bbb2cb11e73cd3eae5a.tar.gz |
[docs minor]add some tips to intern.rst (#15967)
* [docs minor]add some tips yo intern.rst * minor
-rw-r--r-- | doc/intern.rst | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/intern.rst b/doc/intern.rst index 89d477d09..3f8a2ce56 100644 --- a/doc/intern.rst +++ b/doc/intern.rst @@ -153,13 +153,21 @@ are also lots of procs that aid in debugging: debug(symbol) # pretty prints the Nim ast, but annotates symbol IDs: echo renderTree(someNode, {renderIds}) - if n.info ?? "temp.nim": + if `??`(conf, n.info, "temp.nim"): # only output when it comes from "temp.nim" echo renderTree(n) - if n.info ?? "temp.nim": + if `??`(conf, n.info, "temp.nim"): # why does it process temp.nim here? writeStackTrace() +These procs may not be imported by a module. You can import them directly for debugging: + +.. code-block:: nim + from astalgo import debug + from types import typeToString + from renderer import renderTree + from msgs import `??` + To create a new compiler for each run, use ``koch temp``:: ./koch temp c /tmp/test.nim |