Skip to content

Commit

Permalink
d2ast: Make null ScalarString empty string
Browse files Browse the repository at this point in the history
So people know it's special at least until I fix d2compiler.
  • Loading branch information
nhooyr committed Jan 24, 2023
1 parent 4424a0f commit 9d0c73c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion d2ast/d2ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ func (s *SingleQuotedString) scalar() {}
func (s *BlockString) scalar() {}

// TODO: mistake, move into parse.go
func (n *Null) ScalarString() string { return n.Type() }
func (n *Null) ScalarString() string { return "" }
func (b *Boolean) ScalarString() string { return strconv.FormatBool(b.Value) }
func (n *Number) ScalarString() string { return n.Raw }
func (s *UnquotedString) ScalarString() string {
Expand Down

0 comments on commit 9d0c73c

Please sign in to comment.