d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.exp.json
Alexander Wang 9d8418ba15
fix
2025-03-21 21:27:17 -06:00

480 lines
15 KiB
JSON
Generated

{
"graph": {
"name": "",
"isFolderOnly": false,
"ast": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,0:0:0-12:0:62",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,0:0:0-4:1:26",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,0:0:0-0:4:4",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,0:0:0-0:4:4",
"value": [
{
"string": "vars",
"raw_string": "vars"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,0:6:6-4:1:26",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,1:2:10-3:3:24",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,1:2:10-1:3:11",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,1:2:10-1:3:11",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,1:5:13-3:3:24",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,2:4:19-2:5:20",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,2:4:19-2:5:20",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,2:4:19-2:5:20",
"value": [
{
"string": "1",
"raw_string": "1"
}
]
}
}
]
},
"primary": {},
"value": {}
}
}
]
}
}
}
}
]
}
}
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,6:0:28-9:1:57",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,6:0:28-6:1:29",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,6:0:28-6:1:29",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,6:3:31-9:1:57",
"nodes": [
{
"substitution": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,7:2:35-7:9:42",
"spread": true,
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,7:7:40-7:8:41",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,8:2:45-8:12:55",
"edges": [
{
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,8:2:45-8:12:55",
"src": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,8:2:45-8:4:47",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,8:2:45-8:4:47",
"value": [
{
"string": "**",
"raw_string": "**"
}
],
"pattern": [
"*",
"",
"*"
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,8:8:51-8:12:55",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,8:8:51-8:9:52",
"value": [
{
"string": "_",
"raw_string": "_"
}
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,8:10:53-8:12:55",
"value": [
{
"string": "ok",
"raw_string": "ok"
}
]
}
}
]
},
"dst_arrow": ">"
}
],
"primary": {},
"value": {}
}
}
]
}
}
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,11:0:59-11:2:61",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,11:0:59-11:2:61",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,11:0:59-11:2:61",
"value": [
{
"string": "ok",
"raw_string": "ok"
}
]
}
}
]
},
"primary": {},
"value": {}
}
}
]
},
"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
}
],
"attributes": {
"label": {
"value": ""
},
"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/TestCompile/glob-spread-vars/2.d2,6:0:28-6:1:29",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,6:0:28-6:1:29",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"key_path_index": 0,
"map_key_edge_index": -1
}
],
"attributes": {
"label": {
"value": "a"
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {},
"near_key": null,
"shape": {
"value": "rectangle"
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
},
{
"id": "1",
"id_val": "1",
"references": [
{
"key": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,2:4:19-2:5:20",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,2:4:19-2:5:20",
"value": [
{
"string": "1",
"raw_string": "1"
}
]
}
}
]
},
"key_path_index": 0,
"map_key_edge_index": -1
}
],
"attributes": {
"label": {
"value": "1"
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {},
"near_key": null,
"shape": {
"value": "rectangle"
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
},
{
"id": "ok",
"id_val": "ok",
"references": [
{
"key": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,8:8:51-8:12:55",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,8:8:51-8:9:52",
"value": [
{
"string": "_",
"raw_string": "_"
}
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,8:10:53-8:12:55",
"value": [
{
"string": "ok",
"raw_string": "ok"
}
]
}
}
]
},
"key_path_index": 1,
"map_key_edge_index": 0
},
{
"key": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,11:0:59-11:2:61",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,11:0:59-11:2:61",
"value": [
{
"string": "ok",
"raw_string": "ok"
}
]
}
}
]
},
"key_path_index": 0,
"map_key_edge_index": -1
},
{
"key": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,8:8:51-8:12:55",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,8:8:51-8:9:52",
"value": [
{
"string": "_",
"raw_string": "_"
}
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/glob-spread-vars/2.d2,8:10:53-8:12:55",
"value": [
{
"string": "ok",
"raw_string": "ok"
}
]
}
}
]
},
"key_path_index": 1,
"map_key_edge_index": 0
}
],
"attributes": {
"label": {
"value": "ok"
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {},
"near_key": null,
"shape": {
"value": "rectangle"
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
}
]
},
"err": null
}