This commit is contained in:
Alexander Wang 2023-06-20 18:27:45 -07:00
parent 9351a2e2cd
commit 16a879e05b
No known key found for this signature in database
GPG key ID: D89FA31966BDBECE

View file

@ -917,25 +917,6 @@ func (a *Array) AST() d2ast.Node {
return astArray
}
func (m *Map) BaseAST() d2ast.Node {
if m == nil {
return nil
}
astMap := &d2ast.Map{}
astMap.Range = d2ast.MakeRange(",0:0:0-1:0:0")
for _, f := range m.Fields {
if !f.Inherited {
astMap.Nodes = append(astMap.Nodes, d2ast.MakeMapNodeBox(f.AST().(d2ast.MapNode)))
}
}
for _, e := range m.Edges {
if !e.Inherited {
astMap.Nodes = append(astMap.Nodes, d2ast.MakeMapNodeBox(e.AST().(d2ast.MapNode)))
}
}
return astMap
}
func (m *Map) AST() d2ast.Node {
if m == nil {
return nil