fix suspend
This commit is contained in:
parent
3bbb33866e
commit
cbb54f06c0
7 changed files with 1162 additions and 3 deletions
|
|
@ -5617,6 +5617,44 @@ d -> d: "suspend"
|
||||||
assert.Equal(t, 1, len(g.Edges))
|
assert.Equal(t, 1, len(g.Edges))
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "unsuspend-edge-label",
|
||||||
|
run: func(t *testing.T) {
|
||||||
|
g, _ := assertCompile(t, `
|
||||||
|
a -> b: hello
|
||||||
|
c
|
||||||
|
**: suspend
|
||||||
|
(** -> **)[*]: suspend
|
||||||
|
|
||||||
|
(* -> *)[*]: unsuspend
|
||||||
|
`, ``)
|
||||||
|
assert.Equal(t, 2, len(g.Objects))
|
||||||
|
assert.Equal(t, 1, len(g.Edges))
|
||||||
|
assert.Equal(t, "hello", g.Edges[0].Label.Value)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "unsuspend-shape-label",
|
||||||
|
run: func(t *testing.T) {
|
||||||
|
g, _ := assertCompile(t, `
|
||||||
|
a: hello
|
||||||
|
*: suspend
|
||||||
|
*: unsuspend
|
||||||
|
`, ``)
|
||||||
|
assert.Equal(t, 1, len(g.Objects))
|
||||||
|
assert.Equal(t, "hello", g.Objects[0].Label.Value)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "suspend-shape",
|
||||||
|
run: func(t *testing.T) {
|
||||||
|
g, _ := assertCompile(t, `
|
||||||
|
a: hello
|
||||||
|
*: suspend
|
||||||
|
`, ``)
|
||||||
|
assert.Equal(t, 0, len(g.Objects))
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "edge-glob-ampersand-filter/1",
|
name: "edge-glob-ampersand-filter/1",
|
||||||
run: func(t *testing.T) {
|
run: func(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -1285,12 +1285,10 @@ func (c *compiler) _compileEdges(refctx *RefContext) {
|
||||||
|
|
||||||
// If we're unsuspending an edge, we should also unsuspend its src and dst objects
|
// If we're unsuspending an edge, we should also unsuspend its src and dst objects
|
||||||
if !suspensionValue {
|
if !suspensionValue {
|
||||||
// Find the source and destination objects
|
|
||||||
srcPath, dstPath := e.ID.SrcPath, e.ID.DstPath
|
srcPath, dstPath := e.ID.SrcPath, e.ID.DstPath
|
||||||
srcObj := refctx.ScopeMap.GetField(srcPath...)
|
srcObj := refctx.ScopeMap.GetField(srcPath...)
|
||||||
dstObj := refctx.ScopeMap.GetField(dstPath...)
|
dstObj := refctx.ScopeMap.GetField(dstPath...)
|
||||||
|
|
||||||
// Unsuspend the objects
|
|
||||||
if srcObj != nil {
|
if srcObj != nil {
|
||||||
srcObj.suspended = false
|
srcObj.suspended = false
|
||||||
}
|
}
|
||||||
|
|
|
||||||
36
d2ir/d2ir.go
36
d2ir/d2ir.go
|
|
@ -650,7 +650,41 @@ func (rc *RefContext) EdgeIndex() int {
|
||||||
func (rc *RefContext) Equal(rc2 *RefContext) bool {
|
func (rc *RefContext) Equal(rc2 *RefContext) bool {
|
||||||
// We intentionally ignore edges here because the same glob can produce multiple RefContexts that should be treated the same with only the edge as the difference.
|
// We intentionally ignore edges here because the same glob can produce multiple RefContexts that should be treated the same with only the edge as the difference.
|
||||||
// Same with ScopeMap.
|
// Same with ScopeMap.
|
||||||
return rc.Key.Equals(rc2.Key) && rc.Scope == rc2.Scope && rc.ScopeAST == rc2.ScopeAST
|
if !(rc.Key.Equals(rc2.Key) && rc.Scope == rc2.Scope && rc.ScopeAST == rc2.ScopeAST) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if suspension values match for suspension operations
|
||||||
|
// We don't want these two to equal
|
||||||
|
// 1. *: suspend
|
||||||
|
// 2. *: unsuspend
|
||||||
|
hasSuspension1 := (rc.Key.Primary.Suspension != nil || rc.Key.Value.Suspension != nil)
|
||||||
|
hasSuspension2 := (rc2.Key.Primary.Suspension != nil || rc2.Key.Value.Suspension != nil)
|
||||||
|
|
||||||
|
if hasSuspension1 || hasSuspension2 {
|
||||||
|
var val1, val2 bool
|
||||||
|
if rc.Key.Primary.Suspension != nil {
|
||||||
|
val1 = rc.Key.Primary.Suspension.Value
|
||||||
|
} else if rc.Key.Value.Suspension != nil {
|
||||||
|
val1 = rc.Key.Value.Suspension.Value
|
||||||
|
}
|
||||||
|
|
||||||
|
if rc2.Key.Primary.Suspension != nil {
|
||||||
|
val2 = rc2.Key.Primary.Suspension.Value
|
||||||
|
} else if rc2.Key.Value.Suspension != nil {
|
||||||
|
val2 = rc2.Key.Value.Suspension.Value
|
||||||
|
}
|
||||||
|
|
||||||
|
if hasSuspension1 && hasSuspension2 && val1 != val2 {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if hasSuspension1 != hasSuspension2 {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Map) FieldCountRecursive() int {
|
func (m *Map) FieldCountRecursive() int {
|
||||||
|
|
|
||||||
101
testdata/d2compiler/TestCompile2/globs/suspend-shape.exp.json
generated
vendored
Normal file
101
testdata/d2compiler/TestCompile2/globs/suspend-shape.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,101 @@
|
||||||
|
{
|
||||||
|
"graph": {
|
||||||
|
"name": "",
|
||||||
|
"isFolderOnly": true,
|
||||||
|
"ast": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/suspend-shape.d2,0:0:0-3:0:21",
|
||||||
|
"nodes": [
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/suspend-shape.d2,1:0:1-1:8:9",
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/suspend-shape.d2,1:0:1-1:1:2",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/suspend-shape.d2,1:0:1-1:1:2",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "a",
|
||||||
|
"raw_string": "a"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/suspend-shape.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "hello",
|
||||||
|
"raw_string": "hello"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/suspend-shape.d2,2:0:10-2:10:20",
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/suspend-shape.d2,2:0:10-2:1:11",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/suspend-shape.d2,2:0:10-2:1:11",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "*",
|
||||||
|
"raw_string": "*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"suspension": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/suspend-shape.d2,2:3:13-2:10:20",
|
||||||
|
"value": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"id": "",
|
||||||
|
"id_val": "",
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
"edges": null,
|
||||||
|
"objects": null
|
||||||
|
},
|
||||||
|
"err": null
|
||||||
|
}
|
||||||
405
testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.exp.json
generated
vendored
Normal file
405
testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,405 @@
|
||||||
|
{
|
||||||
|
"graph": {
|
||||||
|
"name": "",
|
||||||
|
"isFolderOnly": false,
|
||||||
|
"ast": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,0:0:0-7:0:76",
|
||||||
|
"nodes": [
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,1:0:1-1:13:14",
|
||||||
|
"edges": [
|
||||||
|
{
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,1:0:1-1:6:7",
|
||||||
|
"src": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,1:0:1-1:1:2",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,1:0:1-1:1:2",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "a",
|
||||||
|
"raw_string": "a"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"src_arrow": "",
|
||||||
|
"dst": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,1:5:6-1:6:7",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,1:5:6-1:6:7",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "b",
|
||||||
|
"raw_string": "b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dst_arrow": ">"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,1:8:9-1:13:14",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "hello",
|
||||||
|
"raw_string": "hello"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,2:0:15-2:1:16",
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,2:0:15-2:1:16",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,2:0:15-2:1:16",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "c",
|
||||||
|
"raw_string": "c"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,3:0:17-3:11:28",
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,3:0:17-3:2:19",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,3:0:17-3:2:19",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"suspension": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,3:4:21-3:11:28",
|
||||||
|
"value": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,4:0:29-4:22:51",
|
||||||
|
"edges": [
|
||||||
|
{
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,4:1:30-4:9:38",
|
||||||
|
"src": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,4:1:30-4:3:32",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,4:1:30-4:3:32",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"src_arrow": "",
|
||||||
|
"dst": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,4:7:36-4:9:38",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,4:7:36-4:9:38",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dst_arrow": ">"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"edge_index": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,4:10:39-4:13:42",
|
||||||
|
"int": null,
|
||||||
|
"glob": true
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"suspension": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,4:15:44-4:22:51",
|
||||||
|
"value": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,6:0:53-6:22:75",
|
||||||
|
"edges": [
|
||||||
|
{
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,6:1:54-6:7:60",
|
||||||
|
"src": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,6:1:54-6:2:55",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,6:1:54-6:2:55",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "*",
|
||||||
|
"raw_string": "*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"src_arrow": "",
|
||||||
|
"dst": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,6:6:59-6:7:60",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,6:6:59-6:7:60",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "*",
|
||||||
|
"raw_string": "*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dst_arrow": ">"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"edge_index": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,6:8:61-6:11:64",
|
||||||
|
"int": null,
|
||||||
|
"glob": true
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"suspension": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,6:13:66-6:22:75",
|
||||||
|
"value": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"id": "",
|
||||||
|
"id_val": "",
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
"edges": [
|
||||||
|
{
|
||||||
|
"index": 0,
|
||||||
|
"isCurve": false,
|
||||||
|
"src_arrow": false,
|
||||||
|
"dst_arrow": true,
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"map_key_edge_index": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"map_key_edge_index": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"map_key_edge_index": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": "hello"
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"objects": [
|
||||||
|
{
|
||||||
|
"id": "a",
|
||||||
|
"id_val": "a",
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,1:0:1-1:1:2",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,1:0:1-1:1:2",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "a",
|
||||||
|
"raw_string": "a"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path_index": 0,
|
||||||
|
"map_key_edge_index": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": "a"
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": "rectangle"
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "b",
|
||||||
|
"id_val": "b",
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,1:5:6-1:6:7",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-edge-label.d2,1:5:6-1:6:7",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "b",
|
||||||
|
"raw_string": "b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path_index": 0,
|
||||||
|
"map_key_edge_index": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": "b"
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": "rectangle"
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"err": null
|
||||||
|
}
|
||||||
405
testdata/d2compiler/TestCompile2/globs/unsuspend-label.exp.json
generated
vendored
Normal file
405
testdata/d2compiler/TestCompile2/globs/unsuspend-label.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,405 @@
|
||||||
|
{
|
||||||
|
"graph": {
|
||||||
|
"name": "",
|
||||||
|
"isFolderOnly": false,
|
||||||
|
"ast": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,0:0:0-7:0:76",
|
||||||
|
"nodes": [
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,1:0:1-1:13:14",
|
||||||
|
"edges": [
|
||||||
|
{
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,1:0:1-1:6:7",
|
||||||
|
"src": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,1:0:1-1:1:2",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,1:0:1-1:1:2",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "a",
|
||||||
|
"raw_string": "a"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"src_arrow": "",
|
||||||
|
"dst": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,1:5:6-1:6:7",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,1:5:6-1:6:7",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "b",
|
||||||
|
"raw_string": "b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dst_arrow": ">"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,1:8:9-1:13:14",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "hello",
|
||||||
|
"raw_string": "hello"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,2:0:15-2:1:16",
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,2:0:15-2:1:16",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,2:0:15-2:1:16",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "c",
|
||||||
|
"raw_string": "c"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,3:0:17-3:11:28",
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,3:0:17-3:2:19",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,3:0:17-3:2:19",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"suspension": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,3:4:21-3:11:28",
|
||||||
|
"value": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,4:0:29-4:22:51",
|
||||||
|
"edges": [
|
||||||
|
{
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,4:1:30-4:9:38",
|
||||||
|
"src": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,4:1:30-4:3:32",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,4:1:30-4:3:32",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"src_arrow": "",
|
||||||
|
"dst": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,4:7:36-4:9:38",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,4:7:36-4:9:38",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dst_arrow": ">"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"edge_index": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,4:10:39-4:13:42",
|
||||||
|
"int": null,
|
||||||
|
"glob": true
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"suspension": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,4:15:44-4:22:51",
|
||||||
|
"value": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,6:0:53-6:22:75",
|
||||||
|
"edges": [
|
||||||
|
{
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,6:1:54-6:7:60",
|
||||||
|
"src": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,6:1:54-6:2:55",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,6:1:54-6:2:55",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "*",
|
||||||
|
"raw_string": "*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"src_arrow": "",
|
||||||
|
"dst": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,6:6:59-6:7:60",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,6:6:59-6:7:60",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "*",
|
||||||
|
"raw_string": "*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dst_arrow": ">"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"edge_index": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,6:8:61-6:11:64",
|
||||||
|
"int": null,
|
||||||
|
"glob": true
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"suspension": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,6:13:66-6:22:75",
|
||||||
|
"value": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"id": "",
|
||||||
|
"id_val": "",
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
"edges": [
|
||||||
|
{
|
||||||
|
"index": 0,
|
||||||
|
"isCurve": false,
|
||||||
|
"src_arrow": false,
|
||||||
|
"dst_arrow": true,
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"map_key_edge_index": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"map_key_edge_index": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"map_key_edge_index": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": "hello"
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"objects": [
|
||||||
|
{
|
||||||
|
"id": "a",
|
||||||
|
"id_val": "a",
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,1:0:1-1:1:2",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,1:0:1-1:1:2",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "a",
|
||||||
|
"raw_string": "a"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path_index": 0,
|
||||||
|
"map_key_edge_index": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": "a"
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": "rectangle"
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "b",
|
||||||
|
"id_val": "b",
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,1:5:6-1:6:7",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-label.d2,1:5:6-1:6:7",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "b",
|
||||||
|
"raw_string": "b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path_index": 0,
|
||||||
|
"map_key_edge_index": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": "b"
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": "rectangle"
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"err": null
|
||||||
|
}
|
||||||
178
testdata/d2compiler/TestCompile2/globs/unsuspend-shape-label.exp.json
generated
vendored
Normal file
178
testdata/d2compiler/TestCompile2/globs/unsuspend-shape-label.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,178 @@
|
||||||
|
{
|
||||||
|
"graph": {
|
||||||
|
"name": "",
|
||||||
|
"isFolderOnly": false,
|
||||||
|
"ast": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-shape-label.d2,0:0:0-4:0:34",
|
||||||
|
"nodes": [
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-shape-label.d2,1:0:1-1:8:9",
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-shape-label.d2,1:0:1-1:1:2",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-shape-label.d2,1:0:1-1:1:2",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "a",
|
||||||
|
"raw_string": "a"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-shape-label.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "hello",
|
||||||
|
"raw_string": "hello"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-shape-label.d2,2:0:10-2:10:20",
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-shape-label.d2,2:0:10-2:1:11",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-shape-label.d2,2:0:10-2:1:11",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "*",
|
||||||
|
"raw_string": "*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"suspension": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-shape-label.d2,2:3:13-2:10:20",
|
||||||
|
"value": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-shape-label.d2,3:0:21-3:12:33",
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-shape-label.d2,3:0:21-3:1:22",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-shape-label.d2,3:0:21-3:1:22",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "*",
|
||||||
|
"raw_string": "*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"suspension": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-shape-label.d2,3:3:24-3:12:33",
|
||||||
|
"value": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"id": "",
|
||||||
|
"id_val": "",
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
"edges": null,
|
||||||
|
"objects": [
|
||||||
|
{
|
||||||
|
"id": "a",
|
||||||
|
"id_val": "a",
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-shape-label.d2,1:0:1-1:1:2",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile2/globs/unsuspend-shape-label.d2,1:0:1-1:1:2",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "a",
|
||||||
|
"raw_string": "a"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path_index": 0,
|
||||||
|
"map_key_edge_index": -1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": "hello"
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": "rectangle"
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"err": null
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue