summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorKaushal Modi <kaushal.modi@gmail.com>2018-10-27 09:10:05 -0400
committerDominik Picheta <dominikpicheta@googlemail.com>2018-10-27 14:10:05 +0100
commitf8cef575b322d9736df369e2a33f5ade7d800f95 (patch)
tree64656b79bd130ddf281d2fcfc5733d31f7b31043 /lib/pure
parentdd252ce640c7f624acc08a6702193ec15fd7359b (diff)
downloadNim-f8cef575b322d9736df369e2a33f5ade7d800f95.tar.gz
Improve dumpLisp macro (#9515)
* Improve dumpLisp macro

- Remove commas from the lisp representation of the AST.
- Make the dumpLisp output "pretty" and indented.
- Improve docs of `dumpTree` and `dumpLisp` macros.

With:

    dumpLisp:
      echo "Hello, World!"

Output before this commit:

    StmtList(Command(Ident("echo"), StrLit("Hello, World!")))

Output after this commit:

    (StmtList
     (Command
      (Ident "echo")
      (StrLit "Hello, World!")))

* Re-use the traverse proc inside treeRepr for lispRepr too

- Add module-local `treeTraverse` proc.
- Also fix treeRepr/dumpTree not printing nnkCommentStmt node contents.

* More doc string updates

* Allow unindented lispRepr output for tests

* Update a test affected by the lispRepr change

* Fix dumpTree

* Add note about lispRepr and dumpLisp to changelog [ci skip]
Diffstat (limited to 'lib/pure')
0 files changed, 0 insertions, 0 deletions