Skip to content

Commit

Permalink
Fix embedded fields in ntt dump command (#597)
Browse files Browse the repository at this point in the history
  • Loading branch information
5nord committed Aug 31, 2022
1 parent 5e68d64 commit a78a1d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/ntt/dot.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"bufio"
"encoding/base64"
"fmt"
"html"
"os"
Expand Down Expand Up @@ -65,7 +66,7 @@ func nodeID(n ast.Node) string {
if tok, ok := n.(ast.Token); ok {
return fmt.Sprintf("t%d", tok.Pos())
}
return fmt.Sprintf("n%p", n)
return fmt.Sprintf("n%p%s", n, base64.RawStdEncoding.EncodeToString([]byte(fmt.Sprintf("%T", n))))
}

func nodeProps(n ast.Node) string {
Expand Down

0 comments on commit a78a1d6

Please sign in to comment.