add comment to astalgo.debug (#18594)

This commit is contained in:
Timothee Cour 2021-07-27 00:37:11 -07:00 • committed by GitHub
commit 3b3006ef16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -585,6 +585,9 @@ proc value(this: var DebugPrinter; value: PNode) =
this.openCurly this.openCurly
this.key "kind" this.key "kind"
this.value value.kind this.value value.kind
if value.comment.len > 0:
this.key "comment"
this.value value.comment
when defined(useNodeIds): when defined(useNodeIds):
this.key "id" this.key "id"
this.value value.id this.value value.id