Fix suspend value handling in format.go by adding Suspension case
This commit is contained in:
parent
95c7182f48
commit
9add2e14f4
1 changed files with 6 additions and 0 deletions
|
|
@ -42,6 +42,12 @@ func (p *printer) node(n d2ast.Node) {
|
||||||
p.blockComment(n)
|
p.blockComment(n)
|
||||||
case *d2ast.Null:
|
case *d2ast.Null:
|
||||||
p.sb.WriteString("null")
|
p.sb.WriteString("null")
|
||||||
|
case *d2ast.Suspension:
|
||||||
|
if n.Value {
|
||||||
|
p.sb.WriteString("suspend")
|
||||||
|
} else {
|
||||||
|
p.sb.WriteString("unsuspend")
|
||||||
|
}
|
||||||
case *d2ast.Boolean:
|
case *d2ast.Boolean:
|
||||||
p.sb.WriteString(strconv.FormatBool(n.Value))
|
p.sb.WriteString(strconv.FormatBool(n.Value))
|
||||||
case *d2ast.Number:
|
case *d2ast.Number:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue