From 5f6ee277951c6ea045d5f7a6f22979520a92aa36 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Sun, 24 Nov 2024 10:55:30 -0800 Subject: [PATCH] fix underscore in edges --- d2ir/d2ir.go | 4 +- .../TestCompile/reserved_quoted/3.exp.json | 68 --- .../d2ir/TestCompile/edges/chain.exp.json | 60 ++- .../d2ir/TestCompile/edges/nested.exp.json | 40 +- testdata/d2ir/TestCompile/edges/root.exp.json | 20 +- .../TestCompile/edges/underscore.exp.json | 30 +- .../d2ir/TestCompile/filters/edge.exp.json | 40 +- .../filters/label-filter/1.exp.json | 20 +- .../filters/label-filter/2.exp.json | 40 +- .../filters/label-filter/3.exp.json | 20 +- .../filters/primary-filter.exp.json | 60 ++- .../layers/errs/4/good_edge.exp.json | 20 +- .../d2ir/TestCompile/layers/root.exp.json | 20 +- .../patterns/alixander-review/2.exp.json | 60 ++- .../patterns/alixander-review/3.exp.json | 60 ++- .../patterns/alixander-review/5.exp.json | 20 +- .../patterns/alixander-review/6.exp.json | 40 +- .../patterns/alixander-review/8.exp.json | 20 +- .../double-glob/edge-no-container.exp.json | 110 +++- .../patterns/double-glob/edge/1.exp.json | 30 +- .../patterns/double-glob/edge/2.exp.json | 30 +- .../patterns/edge-glob-index.exp.json | 60 ++- .../edge-glob-style-inherit/1.exp.json | 40 +- .../edge-glob-style-inherit/2.exp.json | 80 ++- .../TestCompile/patterns/edge-nexus.exp.json | 80 ++- .../d2ir/TestCompile/patterns/edge/1.exp.json | 40 +- .../d2ir/TestCompile/patterns/edge/2.exp.json | 40 +- .../d2ir/TestCompile/patterns/edge/3.exp.json | 40 +- .../d2ir/TestCompile/patterns/edge/4.exp.json | 120 ++++- .../patterns/glob-edge-glob-index.exp.json | 80 ++- .../TestCompile/patterns/override/3.exp.json | 40 +- .../TestCompile/patterns/override/4.exp.json | 20 +- .../TestCompile/patterns/override/5.exp.json | 20 +- .../TestCompile/patterns/reserved.exp.json | 120 ++++- .../TestCompile/patterns/scenarios.exp.json | 480 ++++++++++++++++-- .../triple-glob/edge-defaults.exp.json | 120 ++++- .../d2ir/TestCompile/scenarios/edge.exp.json | 40 +- .../scenarios/multiple-scenario-map.exp.json | 40 +- .../d2ir/TestCompile/scenarios/root.exp.json | 60 ++- .../d2ir/TestCompile/steps/recursive.exp.json | 80 ++- testdata/d2ir/TestCompile/steps/root.exp.json | 60 ++- 41 files changed, 2162 insertions(+), 310 deletions(-) diff --git a/d2ir/d2ir.go b/d2ir/d2ir.go index 9400761ee..0e742110e 100644 --- a/d2ir/d2ir.go +++ b/d2ir/d2ir.go @@ -757,7 +757,7 @@ func (m *Map) getField(ida []d2ast.String) *Field { // EnsureField is a bit of a misnomer. It's more of a Query/Ensure combination function at this point. func (m *Map) EnsureField(kp *d2ast.KeyPath, refctx *RefContext, create bool, c *compiler) ([]*Field, error) { i := 0 - for kp.Path[i].Unbox().ScalarString() == "_" { + for kp.Path[i].Unbox().ScalarString() == "_" && kp.Path[i].Unbox().IsUnquoted() { m = ParentMap(m) if m == nil { return nil, d2parser.Errorf(kp.Path[i].Unbox(), "invalid underscore: no parent") @@ -1582,7 +1582,7 @@ func ParentShape(n Node) string { func countUnderscores(p []d2ast.String) int { for i, el := range p { - if el.ScalarString() != "_" || el.IsUnquoted() { + if el.ScalarString() != "_" || !el.IsUnquoted() { return i } } diff --git a/testdata/d2compiler/TestCompile/reserved_quoted/3.exp.json b/testdata/d2compiler/TestCompile/reserved_quoted/3.exp.json index ee0fc6d36..bb563d13a 100644 --- a/testdata/d2compiler/TestCompile/reserved_quoted/3.exp.json +++ b/testdata/d2compiler/TestCompile/reserved_quoted/3.exp.json @@ -96,74 +96,6 @@ "id": "shape", "id_val": "shape", "references": [ - { - "key": { - "range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,0:0:0-0:9:9", - "path": [ - { - "unquoted_string": { - "range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,0:0:0-0:1:1", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - }, - { - "double_quoted_string": { - "range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,0:2:2-0:9:9", - "value": [ - { - "string": "shape", - "raw_string": "shape" - } - ] - } - } - ] - }, - "key_path_index": 1, - "map_key_edge_index": -1 - }, - { - "key": { - "range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,0:0:0-0:9:9", - "path": [ - { - "unquoted_string": { - "range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,0:0:0-0:1:1", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - }, - { - "double_quoted_string": { - "range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,0:2:2-0:9:9", - "value": [ - { - "string": "shape", - "raw_string": "shape" - } - ] - } - } - ] - }, - "key_path_index": 1, - "map_key_edge_index": -1 - }, { "key": { "range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,0:0:0-0:9:9", diff --git a/testdata/d2ir/TestCompile/edges/chain.exp.json b/testdata/d2ir/TestCompile/edges/chain.exp.json index aeb0aafab..046190339 100644 --- a/testdata/d2ir/TestCompile/edges/chain.exp.json +++ b/testdata/d2ir/TestCompile/edges/chain.exp.json @@ -1173,11 +1173,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/edges/chain.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/edges/chain.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1350,11 +1366,27 @@ { "edge_id": { "src_path": [ - "b" + { + "range": "TestCompile/edges/chain.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "src_arrow": false, "dst_path": [ - "c" + { + "range": "TestCompile/edges/chain.d2,0:10:10-0:11:11", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1527,11 +1559,27 @@ { "edge_id": { "src_path": [ - "c" + { + "range": "TestCompile/edges/chain.d2,0:10:10-0:11:11", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } ], "src_arrow": false, "dst_path": [ - "d" + { + "range": "TestCompile/edges/chain.d2,0:15:15-0:16:16", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/edges/nested.exp.json b/testdata/d2ir/TestCompile/edges/nested.exp.json index bb4c4c6a2..b22c45a68 100644 --- a/testdata/d2ir/TestCompile/edges/nested.exp.json +++ b/testdata/d2ir/TestCompile/edges/nested.exp.json @@ -735,13 +735,45 @@ { "edge_id": { "src_path": [ - "x", - "y" + { + "range": "TestCompile/edges/nested.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + { + "range": "TestCompile/edges/nested.d2,0:2:2-0:3:3", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "src_arrow": false, "dst_path": [ - "z", - "p" + { + "range": "TestCompile/edges/nested.d2,0:7:7-0:8:8", + "value": [ + { + "string": "z", + "raw_string": "z" + } + ] + }, + { + "range": "TestCompile/edges/nested.d2,0:9:9-0:10:10", + "value": [ + { + "string": "p", + "raw_string": "p" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/edges/root.exp.json b/testdata/d2ir/TestCompile/edges/root.exp.json index b442d6bdd..7516b678a 100644 --- a/testdata/d2ir/TestCompile/edges/root.exp.json +++ b/testdata/d2ir/TestCompile/edges/root.exp.json @@ -255,11 +255,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/edges/root.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/edges/root.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/edges/underscore.exp.json b/testdata/d2ir/TestCompile/edges/underscore.exp.json index 3145a947b..ef947862b 100644 --- a/testdata/d2ir/TestCompile/edges/underscore.exp.json +++ b/testdata/d2ir/TestCompile/edges/underscore.exp.json @@ -444,12 +444,36 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/edges/underscore.d2,0:7:7-0:8:8", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "p", - "z" + { + "range": "TestCompile/edges/underscore.d2,0:0:0-0:1:1", + "value": [ + { + "string": "p", + "raw_string": "p" + } + ] + }, + { + "range": "TestCompile/edges/underscore.d2,0:12:12-0:13:13", + "value": [ + { + "string": "z", + "raw_string": "z" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/filters/edge.exp.json b/testdata/d2ir/TestCompile/filters/edge.exp.json index 6ca3f3911..5622ca570 100644 --- a/testdata/d2ir/TestCompile/filters/edge.exp.json +++ b/testdata/d2ir/TestCompile/filters/edge.exp.json @@ -1171,11 +1171,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/filters/edge.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/filters/edge.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -2455,11 +2471,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/filters/edge.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/filters/edge.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 1, diff --git a/testdata/d2ir/TestCompile/filters/label-filter/1.exp.json b/testdata/d2ir/TestCompile/filters/label-filter/1.exp.json index 919c0b32e..7b9cda909 100644 --- a/testdata/d2ir/TestCompile/filters/label-filter/1.exp.json +++ b/testdata/d2ir/TestCompile/filters/label-filter/1.exp.json @@ -3213,11 +3213,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/filters/label-filter/1.d2,4:0:10-4:1:11", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "z" + { + "range": "TestCompile/filters/label-filter/1.d2,4:5:15-4:6:16", + "value": [ + { + "string": "z", + "raw_string": "z" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/filters/label-filter/2.exp.json b/testdata/d2ir/TestCompile/filters/label-filter/2.exp.json index 43db3ce00..c8901f508 100644 --- a/testdata/d2ir/TestCompile/filters/label-filter/2.exp.json +++ b/testdata/d2ir/TestCompile/filters/label-filter/2.exp.json @@ -499,11 +499,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/filters/label-filter/2.d2,8:0:83-8:1:84", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/filters/label-filter/2.d2,8:5:88-8:6:89", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1863,11 +1879,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/filters/label-filter/2.d2,8:0:83-8:1:84", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/filters/label-filter/2.d2,8:5:88-8:6:89", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 1, diff --git a/testdata/d2ir/TestCompile/filters/label-filter/3.exp.json b/testdata/d2ir/TestCompile/filters/label-filter/3.exp.json index d238e7807..987ebd9e8 100644 --- a/testdata/d2ir/TestCompile/filters/label-filter/3.exp.json +++ b/testdata/d2ir/TestCompile/filters/label-filter/3.exp.json @@ -275,11 +275,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:1:54", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/filters/label-filter/3.d2,6:5:58-6:6:59", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/filters/primary-filter.exp.json b/testdata/d2ir/TestCompile/filters/primary-filter.exp.json index d8543a7d8..18d20b92f 100644 --- a/testdata/d2ir/TestCompile/filters/primary-filter.exp.json +++ b/testdata/d2ir/TestCompile/filters/primary-filter.exp.json @@ -1084,11 +1084,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/filters/primary-filter.d2,2:2:13-2:3:14", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b1" + { + "range": "TestCompile/filters/primary-filter.d2,2:7:18-2:9:20", + "value": [ + { + "string": "b1", + "raw_string": "b1" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1187,11 +1203,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/filters/primary-filter.d2,2:2:13-2:3:14", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b3" + { + "range": "TestCompile/filters/primary-filter.d2,4:7:38-4:9:40", + "value": [ + { + "string": "b3", + "raw_string": "b3" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1290,11 +1322,27 @@ { "edge_id": { "src_path": [ - "b1" + { + "range": "TestCompile/filters/primary-filter.d2,2:7:18-2:9:20", + "value": [ + { + "string": "b1", + "raw_string": "b1" + } + ] + } ], "src_arrow": false, "dst_path": [ - "c1" + { + "range": "TestCompile/filters/primary-filter.d2,6:8:50-6:10:52", + "value": [ + { + "string": "c1", + "raw_string": "c1" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/layers/errs/4/good_edge.exp.json b/testdata/d2ir/TestCompile/layers/errs/4/good_edge.exp.json index 02d9d1eed..f9cb22e45 100644 --- a/testdata/d2ir/TestCompile/layers/errs/4/good_edge.exp.json +++ b/testdata/d2ir/TestCompile/layers/errs/4/good_edge.exp.json @@ -486,11 +486,27 @@ { "edge_id": { "src_path": [ - "y" + { + "range": "TestCompile/layers/errs/4/good_edge.d2,0:9:9-0:10:10", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/layers/errs/4/good_edge.d2,0:9:9-0:10:10", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/layers/root.exp.json b/testdata/d2ir/TestCompile/layers/root.exp.json index 7596f3e4a..08f0334ed 100644 --- a/testdata/d2ir/TestCompile/layers/root.exp.json +++ b/testdata/d2ir/TestCompile/layers/root.exp.json @@ -868,11 +868,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/layers/root.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/layers/root.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/patterns/alixander-review/2.exp.json b/testdata/d2ir/TestCompile/patterns/alixander-review/2.exp.json index f8ffd52a6..80f5083dc 100644 --- a/testdata/d2ir/TestCompile/patterns/alixander-review/2.exp.json +++ b/testdata/d2ir/TestCompile/patterns/alixander-review/2.exp.json @@ -806,11 +806,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/patterns/alixander-review/2.d2,1:0:1-1:1:2", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/patterns/alixander-review/2.d2,3:5:9-3:6:10", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -915,11 +931,27 @@ { "edge_id": { "src_path": [ - "b" + { + "range": "TestCompile/patterns/alixander-review/2.d2,5:0:12-5:1:13", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/patterns/alixander-review/2.d2,3:5:9-3:6:10", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1024,11 +1056,27 @@ { "edge_id": { "src_path": [ - "c" + { + "range": "TestCompile/patterns/alixander-review/2.d2,6:0:14-6:1:15", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/patterns/alixander-review/2.d2,3:5:9-3:6:10", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/patterns/alixander-review/3.exp.json b/testdata/d2ir/TestCompile/patterns/alixander-review/3.exp.json index 42b241363..f9c230282 100644 --- a/testdata/d2ir/TestCompile/patterns/alixander-review/3.exp.json +++ b/testdata/d2ir/TestCompile/patterns/alixander-review/3.exp.json @@ -2853,12 +2853,36 @@ { "edge_id": { "src_path": [ - "d", - "b" + { + "range": "TestCompile/patterns/alixander-review/3.d2,7:4:37-7:5:38", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + }, + { + "range": "TestCompile/patterns/alixander-review/3.d2,3:4:8-3:5:9", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "src_arrow": false, "dst_path": [ - "c" + { + "range": "TestCompile/patterns/alixander-review/3.d2,3:9:13-3:10:14", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -3732,12 +3756,36 @@ { "edge_id": { "src_path": [ - "a", - "b" + { + "range": "TestCompile/patterns/alixander-review/3.d2,1:0:1-1:1:2", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + }, + { + "range": "TestCompile/patterns/alixander-review/3.d2,3:4:8-3:5:9", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "src_arrow": false, "dst_path": [ - "c" + { + "range": "TestCompile/patterns/alixander-review/3.d2,3:9:13-3:10:14", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/patterns/alixander-review/5.exp.json b/testdata/d2ir/TestCompile/patterns/alixander-review/5.exp.json index 141698860..676ef76cc 100644 --- a/testdata/d2ir/TestCompile/patterns/alixander-review/5.exp.json +++ b/testdata/d2ir/TestCompile/patterns/alixander-review/5.exp.json @@ -2254,11 +2254,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/patterns/alixander-review/5.d2,5:4:45-5:5:46", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/patterns/alixander-review/5.d2,5:9:50-5:10:51", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/patterns/alixander-review/6.exp.json b/testdata/d2ir/TestCompile/patterns/alixander-review/6.exp.json index c5fe6579c..e4ee83a08 100644 --- a/testdata/d2ir/TestCompile/patterns/alixander-review/6.exp.json +++ b/testdata/d2ir/TestCompile/patterns/alixander-review/6.exp.json @@ -499,11 +499,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/patterns/alixander-review/6.d2,3:0:33-3:1:34", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/patterns/alixander-review/6.d2,3:5:38-3:6:39", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1149,11 +1165,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/patterns/alixander-review/6.d2,3:0:33-3:1:34", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/patterns/alixander-review/6.d2,3:5:38-3:6:39", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 1, diff --git a/testdata/d2ir/TestCompile/patterns/alixander-review/8.exp.json b/testdata/d2ir/TestCompile/patterns/alixander-review/8.exp.json index d1770ba79..ff3df8a4b 100644 --- a/testdata/d2ir/TestCompile/patterns/alixander-review/8.exp.json +++ b/testdata/d2ir/TestCompile/patterns/alixander-review/8.exp.json @@ -255,11 +255,27 @@ { "edge_id": { "src_path": [ - "b" + { + "range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:1:63", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "src_arrow": false, "dst_path": [ - "c" + { + "range": "TestCompile/patterns/alixander-review/8.d2,4:5:67-4:6:68", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/patterns/double-glob/edge-no-container.exp.json b/testdata/d2ir/TestCompile/patterns/double-glob/edge-no-container.exp.json index e51884ec3..a43d04e43 100644 --- a/testdata/d2ir/TestCompile/patterns/double-glob/edge-no-container.exp.json +++ b/testdata/d2ir/TestCompile/patterns/double-glob/edge-no-container.exp.json @@ -818,12 +818,36 @@ { "edge_id": { "src_path": [ - "zone A", - "machine A" + { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,0:0:0-0:6:6", + "value": [ + { + "string": "zone A", + "raw_string": "zone A" + } + ] + }, + { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,1:1:11-1:10:20", + "value": [ + { + "string": "machine A", + "raw_string": "machine A" + } + ] + } ], "src_arrow": false, "dst_path": [ - "load balancer" + { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "value": [ + { + "string": "load balancer", + "raw_string": "load balancer" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -954,13 +978,45 @@ { "edge_id": { "src_path": [ - "zone A", - "machine B", - "submachine A" + { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,0:0:0-0:6:6", + "value": [ + { + "string": "zone A", + "raw_string": "zone A" + } + ] + }, + { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,2:1:22-2:10:31", + "value": [ + { + "string": "machine B", + "raw_string": "machine B" + } + ] + }, + { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,3:2:37-3:14:49", + "value": [ + { + "string": "submachine A", + "raw_string": "submachine A" + } + ] + } ], "src_arrow": false, "dst_path": [ - "load balancer" + { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "value": [ + { + "string": "load balancer", + "raw_string": "load balancer" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1091,13 +1147,45 @@ { "edge_id": { "src_path": [ - "zone A", - "machine B", - "submachine B" + { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,0:0:0-0:6:6", + "value": [ + { + "string": "zone A", + "raw_string": "zone A" + } + ] + }, + { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,2:1:22-2:10:31", + "value": [ + { + "string": "machine B", + "raw_string": "machine B" + } + ] + }, + { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,4:2:52-4:14:64", + "value": [ + { + "string": "submachine B", + "raw_string": "submachine B" + } + ] + } ], "src_arrow": false, "dst_path": [ - "load balancer" + { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "value": [ + { + "string": "load balancer", + "raw_string": "load balancer" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/patterns/double-glob/edge/1.exp.json b/testdata/d2ir/TestCompile/patterns/double-glob/edge/1.exp.json index ac6f162e9..a4a865b93 100644 --- a/testdata/d2ir/TestCompile/patterns/double-glob/edge/1.exp.json +++ b/testdata/d2ir/TestCompile/patterns/double-glob/edge/1.exp.json @@ -730,12 +730,36 @@ { "edge_id": { "src_path": [ - "task", - "a" + { + "range": "TestCompile/patterns/double-glob/edge/1.d2,5:0:21-5:4:25", + "value": [ + { + "string": "task", + "raw_string": "task" + } + ] + }, + { + "range": "TestCompile/patterns/double-glob/edge/1.d2,6:2:31-6:3:32", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "fast" + { + "range": "TestCompile/patterns/double-glob/edge/1.d2,0:0:0-0:4:4", + "value": [ + { + "string": "fast", + "raw_string": "fast" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/patterns/double-glob/edge/2.exp.json b/testdata/d2ir/TestCompile/patterns/double-glob/edge/2.exp.json index f38e7e726..b076a2afb 100644 --- a/testdata/d2ir/TestCompile/patterns/double-glob/edge/2.exp.json +++ b/testdata/d2ir/TestCompile/patterns/double-glob/edge/2.exp.json @@ -406,12 +406,36 @@ { "edge_id": { "src_path": [ - "a", - "b" + { + "range": "TestCompile/patterns/double-glob/edge/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + }, + { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:3:6-2:4:7", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "src_arrow": false, "dst_path": [ - "c" + { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:8:11-2:9:12", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/patterns/edge-glob-index.exp.json b/testdata/d2ir/TestCompile/patterns/edge-glob-index.exp.json index 625cbddbc..b19cf8189 100644 --- a/testdata/d2ir/TestCompile/patterns/edge-glob-index.exp.json +++ b/testdata/d2ir/TestCompile/patterns/edge-glob-index.exp.json @@ -1627,11 +1627,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/patterns/edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -2236,11 +2252,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/patterns/edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 1, @@ -2845,11 +2877,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/patterns/edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 2, diff --git a/testdata/d2ir/TestCompile/patterns/edge-glob-style-inherit/1.exp.json b/testdata/d2ir/TestCompile/patterns/edge-glob-style-inherit/1.exp.json index 241cca559..cb4d52c8f 100644 --- a/testdata/d2ir/TestCompile/patterns/edge-glob-style-inherit/1.exp.json +++ b/testdata/d2ir/TestCompile/patterns/edge-glob-style-inherit/1.exp.json @@ -1593,11 +1593,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -3424,11 +3440,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/patterns/edge-glob-style-inherit/2.exp.json b/testdata/d2ir/TestCompile/patterns/edge-glob-style-inherit/2.exp.json index 2c010d9ef..ff631774e 100644 --- a/testdata/d2ir/TestCompile/patterns/edge-glob-style-inherit/2.exp.json +++ b/testdata/d2ir/TestCompile/patterns/edge-glob-style-inherit/2.exp.json @@ -7309,11 +7309,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -13900,11 +13916,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -21481,11 +21513,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -24885,11 +24933,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/patterns/edge-nexus.exp.json b/testdata/d2ir/TestCompile/patterns/edge-nexus.exp.json index 42fb7fc68..82142a1b6 100644 --- a/testdata/d2ir/TestCompile/patterns/edge-nexus.exp.json +++ b/testdata/d2ir/TestCompile/patterns/edge-nexus.exp.json @@ -400,11 +400,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/patterns/edge-nexus.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "nexus" + { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "value": [ + { + "string": "nexus", + "raw_string": "nexus" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -509,11 +525,27 @@ { "edge_id": { "src_path": [ - "b" + { + "range": "TestCompile/patterns/edge-nexus.d2,1:0:2-1:1:3", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "src_arrow": false, "dst_path": [ - "nexus" + { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "value": [ + { + "string": "nexus", + "raw_string": "nexus" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -618,11 +650,27 @@ { "edge_id": { "src_path": [ - "c" + { + "range": "TestCompile/patterns/edge-nexus.d2,2:0:4-2:1:5", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } ], "src_arrow": false, "dst_path": [ - "nexus" + { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "value": [ + { + "string": "nexus", + "raw_string": "nexus" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -727,11 +775,27 @@ { "edge_id": { "src_path": [ - "d" + { + "range": "TestCompile/patterns/edge-nexus.d2,3:0:6-3:1:7", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + } ], "src_arrow": false, "dst_path": [ - "nexus" + { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "value": [ + { + "string": "nexus", + "raw_string": "nexus" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/patterns/edge/1.exp.json b/testdata/d2ir/TestCompile/patterns/edge/1.exp.json index d550db9c1..eb2826547 100644 --- a/testdata/d2ir/TestCompile/patterns/edge/1.exp.json +++ b/testdata/d2ir/TestCompile/patterns/edge/1.exp.json @@ -137,11 +137,27 @@ { "edge_id": { "src_path": [ - "animate" + { + "range": "TestCompile/patterns/edge/1.d2,0:0:0-0:7:7", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } ], "src_arrow": false, "dst_path": [ - "animal" + { + "range": "TestCompile/patterns/edge/1.d2,1:0:8-1:6:14", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -256,11 +272,27 @@ { "edge_id": { "src_path": [ - "animal" + { + "range": "TestCompile/patterns/edge/1.d2,1:0:8-1:6:14", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } ], "src_arrow": false, "dst_path": [ - "animate" + { + "range": "TestCompile/patterns/edge/1.d2,0:0:0-0:7:7", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/patterns/edge/2.exp.json b/testdata/d2ir/TestCompile/patterns/edge/2.exp.json index 0679c9e6f..f7e1516ce 100644 --- a/testdata/d2ir/TestCompile/patterns/edge/2.exp.json +++ b/testdata/d2ir/TestCompile/patterns/edge/2.exp.json @@ -193,11 +193,27 @@ { "edge_id": { "src_path": [ - "animate" + { + "range": "TestCompile/patterns/edge/2.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } ], "src_arrow": false, "dst_path": [ - "animal" + { + "range": "TestCompile/patterns/edge/2.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -332,11 +348,27 @@ { "edge_id": { "src_path": [ - "animal" + { + "range": "TestCompile/patterns/edge/2.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } ], "src_arrow": false, "dst_path": [ - "animate" + { + "range": "TestCompile/patterns/edge/2.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/patterns/edge/3.exp.json b/testdata/d2ir/TestCompile/patterns/edge/3.exp.json index 563e08697..4986e0fc5 100644 --- a/testdata/d2ir/TestCompile/patterns/edge/3.exp.json +++ b/testdata/d2ir/TestCompile/patterns/edge/3.exp.json @@ -193,11 +193,27 @@ { "edge_id": { "src_path": [ - "animate" + { + "range": "TestCompile/patterns/edge/3.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } ], "src_arrow": false, "dst_path": [ - "animal" + { + "range": "TestCompile/patterns/edge/3.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -372,11 +388,27 @@ { "edge_id": { "src_path": [ - "animal" + { + "range": "TestCompile/patterns/edge/3.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } ], "src_arrow": false, "dst_path": [ - "animate" + { + "range": "TestCompile/patterns/edge/3.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/patterns/edge/4.exp.json b/testdata/d2ir/TestCompile/patterns/edge/4.exp.json index 8024698a6..0e71feff0 100644 --- a/testdata/d2ir/TestCompile/patterns/edge/4.exp.json +++ b/testdata/d2ir/TestCompile/patterns/edge/4.exp.json @@ -470,11 +470,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/patterns/edge/4.d2,1:3:12-1:4:13", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/patterns/edge/4.d2,8:18:55-8:19:56", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1187,11 +1203,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/patterns/edge/4.d2,8:7:44-8:8:45", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/patterns/edge/4.d2,5:3:31-5:4:32", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1439,13 +1471,45 @@ { "edge_id": { "src_path": [ - "app_a", - "x" + { + "range": "TestCompile/patterns/edge/4.d2,0:0:0-0:5:5", + "value": [ + { + "string": "app_a", + "raw_string": "app_a" + } + ] + }, + { + "range": "TestCompile/patterns/edge/4.d2,1:3:12-1:4:13", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "app_b", - "y" + { + "range": "TestCompile/patterns/edge/4.d2,4:1:19-4:6:24", + "value": [ + { + "string": "app_b", + "raw_string": "app_b" + } + ] + }, + { + "range": "TestCompile/patterns/edge/4.d2,5:3:31-5:4:32", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1604,13 +1668,45 @@ { "edge_id": { "src_path": [ - "app_b", - "x" + { + "range": "TestCompile/patterns/edge/4.d2,4:1:19-4:6:24", + "value": [ + { + "string": "app_b", + "raw_string": "app_b" + } + ] + }, + { + "range": "TestCompile/patterns/edge/4.d2,8:7:44-8:8:45", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "app_a", - "y" + { + "range": "TestCompile/patterns/edge/4.d2,0:0:0-0:5:5", + "value": [ + { + "string": "app_a", + "raw_string": "app_a" + } + ] + }, + { + "range": "TestCompile/patterns/edge/4.d2,8:18:55-8:19:56", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/patterns/glob-edge-glob-index.exp.json b/testdata/d2ir/TestCompile/patterns/glob-edge-glob-index.exp.json index 30745c840..7a1b8fc34 100644 --- a/testdata/d2ir/TestCompile/patterns/glob-edge-glob-index.exp.json +++ b/testdata/d2ir/TestCompile/patterns/glob-edge-glob-index.exp.json @@ -1580,11 +1580,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -2207,11 +2223,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 1, @@ -2834,11 +2866,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 2, @@ -3461,11 +3509,27 @@ { "edge_id": { "src_path": [ - "c" + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:1:22", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/patterns/override/3.exp.json b/testdata/d2ir/TestCompile/patterns/override/3.exp.json index c8fce0556..2be7ec5e2 100644 --- a/testdata/d2ir/TestCompile/patterns/override/3.exp.json +++ b/testdata/d2ir/TestCompile/patterns/override/3.exp.json @@ -553,11 +553,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/patterns/override/3.d2,12:8:175-12:9:176", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/patterns/override/3.d2,12:13:180-12:14:181", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -8160,11 +8176,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/patterns/override/3.d2,3:0:28-3:1:29", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/patterns/override/3.d2,3:5:33-3:6:34", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/patterns/override/4.exp.json b/testdata/d2ir/TestCompile/patterns/override/4.exp.json index 6d3d73bb5..3c38e65f0 100644 --- a/testdata/d2ir/TestCompile/patterns/override/4.exp.json +++ b/testdata/d2ir/TestCompile/patterns/override/4.exp.json @@ -333,11 +333,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/patterns/override/4.d2,3:0:28-3:1:29", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/patterns/override/4.d2,3:5:33-3:6:34", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/patterns/override/5.exp.json b/testdata/d2ir/TestCompile/patterns/override/5.exp.json index 08d282a70..0b2e4e7ac 100644 --- a/testdata/d2ir/TestCompile/patterns/override/5.exp.json +++ b/testdata/d2ir/TestCompile/patterns/override/5.exp.json @@ -255,11 +255,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/patterns/override/5.d2,4:0:74-4:1:75", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/patterns/override/5.d2,4:5:79-4:6:80", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/patterns/reserved.exp.json b/testdata/d2ir/TestCompile/patterns/reserved.exp.json index 4528cc15b..d287e3151 100644 --- a/testdata/d2ir/TestCompile/patterns/reserved.exp.json +++ b/testdata/d2ir/TestCompile/patterns/reserved.exp.json @@ -539,11 +539,27 @@ { "edge_id": { "src_path": [ - "Spiderman 1" + { + "range": "TestCompile/patterns/reserved.d2,6:0:53-6:11:64", + "value": [ + { + "string": "Spiderman 1", + "raw_string": "Spiderman 1" + } + ] + } ], "src_arrow": false, "dst_path": [ - "Spiderman 2" + { + "range": "TestCompile/patterns/reserved.d2,7:0:65-7:11:76", + "value": [ + { + "string": "Spiderman 2", + "raw_string": "Spiderman 2" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -675,11 +691,27 @@ { "edge_id": { "src_path": [ - "Spiderman 1" + { + "range": "TestCompile/patterns/reserved.d2,6:0:53-6:11:64", + "value": [ + { + "string": "Spiderman 1", + "raw_string": "Spiderman 1" + } + ] + } ], "src_arrow": false, "dst_path": [ - "Spiderman 3" + { + "range": "TestCompile/patterns/reserved.d2,8:0:77-8:11:88", + "value": [ + { + "string": "Spiderman 3", + "raw_string": "Spiderman 3" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -811,11 +843,27 @@ { "edge_id": { "src_path": [ - "Spiderman 2" + { + "range": "TestCompile/patterns/reserved.d2,7:0:65-7:11:76", + "value": [ + { + "string": "Spiderman 2", + "raw_string": "Spiderman 2" + } + ] + } ], "src_arrow": false, "dst_path": [ - "Spiderman 1" + { + "range": "TestCompile/patterns/reserved.d2,6:0:53-6:11:64", + "value": [ + { + "string": "Spiderman 1", + "raw_string": "Spiderman 1" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -947,11 +995,27 @@ { "edge_id": { "src_path": [ - "Spiderman 2" + { + "range": "TestCompile/patterns/reserved.d2,7:0:65-7:11:76", + "value": [ + { + "string": "Spiderman 2", + "raw_string": "Spiderman 2" + } + ] + } ], "src_arrow": false, "dst_path": [ - "Spiderman 3" + { + "range": "TestCompile/patterns/reserved.d2,8:0:77-8:11:88", + "value": [ + { + "string": "Spiderman 3", + "raw_string": "Spiderman 3" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1083,11 +1147,27 @@ { "edge_id": { "src_path": [ - "Spiderman 3" + { + "range": "TestCompile/patterns/reserved.d2,8:0:77-8:11:88", + "value": [ + { + "string": "Spiderman 3", + "raw_string": "Spiderman 3" + } + ] + } ], "src_arrow": false, "dst_path": [ - "Spiderman 1" + { + "range": "TestCompile/patterns/reserved.d2,6:0:53-6:11:64", + "value": [ + { + "string": "Spiderman 1", + "raw_string": "Spiderman 1" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1219,11 +1299,27 @@ { "edge_id": { "src_path": [ - "Spiderman 3" + { + "range": "TestCompile/patterns/reserved.d2,8:0:77-8:11:88", + "value": [ + { + "string": "Spiderman 3", + "raw_string": "Spiderman 3" + } + ] + } ], "src_arrow": false, "dst_path": [ - "Spiderman 2" + { + "range": "TestCompile/patterns/reserved.d2,7:0:65-7:11:76", + "value": [ + { + "string": "Spiderman 2", + "raw_string": "Spiderman 2" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/patterns/scenarios.exp.json b/testdata/d2ir/TestCompile/patterns/scenarios.exp.json index e7882c90c..b2bcb9333 100644 --- a/testdata/d2ir/TestCompile/patterns/scenarios.exp.json +++ b/testdata/d2ir/TestCompile/patterns/scenarios.exp.json @@ -337,11 +337,27 @@ { "edge_id": { "src_path": [ - "e" + { + "range": "TestCompile/patterns/scenarios.d2,4:1:26-4:2:27", + "value": [ + { + "string": "e", + "raw_string": "e" + } + ] + } ], "src_arrow": false, "dst_path": [ - "f" + { + "range": "TestCompile/patterns/scenarios.d2,5:1:29-5:2:30", + "value": [ + { + "string": "f", + "raw_string": "f" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -460,11 +476,27 @@ { "edge_id": { "src_path": [ - "e" + { + "range": "TestCompile/patterns/scenarios.d2,4:1:26-4:2:27", + "value": [ + { + "string": "e", + "raw_string": "e" + } + ] + } ], "src_arrow": false, "dst_path": [ - "g" + { + "range": "TestCompile/patterns/scenarios.d2,6:1:32-6:2:33", + "value": [ + { + "string": "g", + "raw_string": "g" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -583,11 +615,27 @@ { "edge_id": { "src_path": [ - "e" + { + "range": "TestCompile/patterns/scenarios.d2,4:1:26-4:2:27", + "value": [ + { + "string": "e", + "raw_string": "e" + } + ] + } ], "src_arrow": false, "dst_path": [ - "h" + { + "range": "TestCompile/patterns/scenarios.d2,7:1:35-7:2:36", + "value": [ + { + "string": "h", + "raw_string": "h" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -706,11 +754,27 @@ { "edge_id": { "src_path": [ - "f" + { + "range": "TestCompile/patterns/scenarios.d2,5:1:29-5:2:30", + "value": [ + { + "string": "f", + "raw_string": "f" + } + ] + } ], "src_arrow": false, "dst_path": [ - "e" + { + "range": "TestCompile/patterns/scenarios.d2,4:1:26-4:2:27", + "value": [ + { + "string": "e", + "raw_string": "e" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -829,11 +893,27 @@ { "edge_id": { "src_path": [ - "f" + { + "range": "TestCompile/patterns/scenarios.d2,5:1:29-5:2:30", + "value": [ + { + "string": "f", + "raw_string": "f" + } + ] + } ], "src_arrow": false, "dst_path": [ - "g" + { + "range": "TestCompile/patterns/scenarios.d2,6:1:32-6:2:33", + "value": [ + { + "string": "g", + "raw_string": "g" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -952,11 +1032,27 @@ { "edge_id": { "src_path": [ - "f" + { + "range": "TestCompile/patterns/scenarios.d2,5:1:29-5:2:30", + "value": [ + { + "string": "f", + "raw_string": "f" + } + ] + } ], "src_arrow": false, "dst_path": [ - "h" + { + "range": "TestCompile/patterns/scenarios.d2,7:1:35-7:2:36", + "value": [ + { + "string": "h", + "raw_string": "h" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1075,11 +1171,27 @@ { "edge_id": { "src_path": [ - "g" + { + "range": "TestCompile/patterns/scenarios.d2,6:1:32-6:2:33", + "value": [ + { + "string": "g", + "raw_string": "g" + } + ] + } ], "src_arrow": false, "dst_path": [ - "e" + { + "range": "TestCompile/patterns/scenarios.d2,4:1:26-4:2:27", + "value": [ + { + "string": "e", + "raw_string": "e" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1198,11 +1310,27 @@ { "edge_id": { "src_path": [ - "g" + { + "range": "TestCompile/patterns/scenarios.d2,6:1:32-6:2:33", + "value": [ + { + "string": "g", + "raw_string": "g" + } + ] + } ], "src_arrow": false, "dst_path": [ - "f" + { + "range": "TestCompile/patterns/scenarios.d2,5:1:29-5:2:30", + "value": [ + { + "string": "f", + "raw_string": "f" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1321,11 +1449,27 @@ { "edge_id": { "src_path": [ - "g" + { + "range": "TestCompile/patterns/scenarios.d2,6:1:32-6:2:33", + "value": [ + { + "string": "g", + "raw_string": "g" + } + ] + } ], "src_arrow": false, "dst_path": [ - "h" + { + "range": "TestCompile/patterns/scenarios.d2,7:1:35-7:2:36", + "value": [ + { + "string": "h", + "raw_string": "h" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1444,11 +1588,27 @@ { "edge_id": { "src_path": [ - "h" + { + "range": "TestCompile/patterns/scenarios.d2,7:1:35-7:2:36", + "value": [ + { + "string": "h", + "raw_string": "h" + } + ] + } ], "src_arrow": false, "dst_path": [ - "e" + { + "range": "TestCompile/patterns/scenarios.d2,4:1:26-4:2:27", + "value": [ + { + "string": "e", + "raw_string": "e" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1567,11 +1727,27 @@ { "edge_id": { "src_path": [ - "h" + { + "range": "TestCompile/patterns/scenarios.d2,7:1:35-7:2:36", + "value": [ + { + "string": "h", + "raw_string": "h" + } + ] + } ], "src_arrow": false, "dst_path": [ - "f" + { + "range": "TestCompile/patterns/scenarios.d2,5:1:29-5:2:30", + "value": [ + { + "string": "f", + "raw_string": "f" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1690,11 +1866,27 @@ { "edge_id": { "src_path": [ - "h" + { + "range": "TestCompile/patterns/scenarios.d2,7:1:35-7:2:36", + "value": [ + { + "string": "h", + "raw_string": "h" + } + ] + } ], "src_arrow": false, "dst_path": [ - "g" + { + "range": "TestCompile/patterns/scenarios.d2,6:1:32-6:2:33", + "value": [ + { + "string": "g", + "raw_string": "g" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -2465,11 +2657,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/patterns/scenarios.d2,11:0:44-11:1:45", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/patterns/scenarios.d2,12:0:46-12:1:47", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -2588,11 +2796,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/patterns/scenarios.d2,11:0:44-11:1:45", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "c" + { + "range": "TestCompile/patterns/scenarios.d2,13:0:48-13:1:49", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -2711,11 +2935,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/patterns/scenarios.d2,11:0:44-11:1:45", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "d" + { + "range": "TestCompile/patterns/scenarios.d2,14:0:50-14:1:51", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -2834,11 +3074,27 @@ { "edge_id": { "src_path": [ - "b" + { + "range": "TestCompile/patterns/scenarios.d2,12:0:46-12:1:47", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "src_arrow": false, "dst_path": [ - "a" + { + "range": "TestCompile/patterns/scenarios.d2,11:0:44-11:1:45", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -2957,11 +3213,27 @@ { "edge_id": { "src_path": [ - "b" + { + "range": "TestCompile/patterns/scenarios.d2,12:0:46-12:1:47", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "src_arrow": false, "dst_path": [ - "c" + { + "range": "TestCompile/patterns/scenarios.d2,13:0:48-13:1:49", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -3080,11 +3352,27 @@ { "edge_id": { "src_path": [ - "b" + { + "range": "TestCompile/patterns/scenarios.d2,12:0:46-12:1:47", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "src_arrow": false, "dst_path": [ - "d" + { + "range": "TestCompile/patterns/scenarios.d2,14:0:50-14:1:51", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -3203,11 +3491,27 @@ { "edge_id": { "src_path": [ - "c" + { + "range": "TestCompile/patterns/scenarios.d2,13:0:48-13:1:49", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } ], "src_arrow": false, "dst_path": [ - "a" + { + "range": "TestCompile/patterns/scenarios.d2,11:0:44-11:1:45", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -3326,11 +3630,27 @@ { "edge_id": { "src_path": [ - "c" + { + "range": "TestCompile/patterns/scenarios.d2,13:0:48-13:1:49", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/patterns/scenarios.d2,12:0:46-12:1:47", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -3449,11 +3769,27 @@ { "edge_id": { "src_path": [ - "c" + { + "range": "TestCompile/patterns/scenarios.d2,13:0:48-13:1:49", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } ], "src_arrow": false, "dst_path": [ - "d" + { + "range": "TestCompile/patterns/scenarios.d2,14:0:50-14:1:51", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -3572,11 +3908,27 @@ { "edge_id": { "src_path": [ - "d" + { + "range": "TestCompile/patterns/scenarios.d2,14:0:50-14:1:51", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + } ], "src_arrow": false, "dst_path": [ - "a" + { + "range": "TestCompile/patterns/scenarios.d2,11:0:44-11:1:45", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -3695,11 +4047,27 @@ { "edge_id": { "src_path": [ - "d" + { + "range": "TestCompile/patterns/scenarios.d2,14:0:50-14:1:51", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/patterns/scenarios.d2,12:0:46-12:1:47", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -3818,11 +4186,27 @@ { "edge_id": { "src_path": [ - "d" + { + "range": "TestCompile/patterns/scenarios.d2,14:0:50-14:1:51", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + } ], "src_arrow": false, "dst_path": [ - "c" + { + "range": "TestCompile/patterns/scenarios.d2,13:0:48-13:1:49", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/patterns/triple-glob/edge-defaults.exp.json b/testdata/d2ir/TestCompile/patterns/triple-glob/edge-defaults.exp.json index c5c892e94..54aa40e1d 100644 --- a/testdata/d2ir/TestCompile/patterns/triple-glob/edge-defaults.exp.json +++ b/testdata/d2ir/TestCompile/patterns/triple-glob/edge-defaults.exp.json @@ -1279,11 +1279,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/patterns/triple-glob/edge-defaults.d2,4:0:55-4:1:56", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/patterns/triple-glob/edge-defaults.d2,4:5:60-4:6:61", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -2134,11 +2150,27 @@ { "edge_id": { "src_path": [ - "c" + { + "range": "TestCompile/patterns/triple-glob/edge-defaults.d2,5:0:62-5:1:63", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } ], "src_arrow": false, "dst_path": [ - "d" + { + "range": "TestCompile/patterns/triple-glob/edge-defaults.d2,5:5:67-5:6:68", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -2989,11 +3021,27 @@ { "edge_id": { "src_path": [ - "p" + { + "range": "TestCompile/patterns/triple-glob/edge-defaults.d2,7:15:85-7:16:86", + "value": [ + { + "string": "p", + "raw_string": "p" + } + ] + } ], "src_arrow": false, "dst_path": [ - "q" + { + "range": "TestCompile/patterns/triple-glob/edge-defaults.d2,7:20:90-7:21:91", + "value": [ + { + "string": "q", + "raw_string": "q" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -5469,11 +5517,27 @@ { "edge_id": { "src_path": [ - "j" + { + "range": "TestCompile/patterns/triple-glob/edge-defaults.d2,8:12:106-8:13:107", + "value": [ + { + "string": "j", + "raw_string": "j" + } + ] + } ], "src_arrow": false, "dst_path": [ - "f" + { + "range": "TestCompile/patterns/triple-glob/edge-defaults.d2,8:17:111-8:18:112", + "value": [ + { + "string": "f", + "raw_string": "f" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -7675,11 +7739,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/patterns/triple-glob/edge-defaults.d2,4:0:55-4:1:56", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/patterns/triple-glob/edge-defaults.d2,4:5:60-4:6:61", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -8165,11 +8245,27 @@ { "edge_id": { "src_path": [ - "c" + { + "range": "TestCompile/patterns/triple-glob/edge-defaults.d2,5:0:62-5:1:63", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } ], "src_arrow": false, "dst_path": [ - "d" + { + "range": "TestCompile/patterns/triple-glob/edge-defaults.d2,5:5:67-5:6:68", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/scenarios/edge.exp.json b/testdata/d2ir/TestCompile/scenarios/edge.exp.json index 9e6e0e618..e310c85e5 100644 --- a/testdata/d2ir/TestCompile/scenarios/edge.exp.json +++ b/testdata/d2ir/TestCompile/scenarios/edge.exp.json @@ -829,11 +829,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/scenarios/edge.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/scenarios/edge.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1750,11 +1766,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/scenarios/edge.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/scenarios/edge.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/scenarios/multiple-scenario-map.exp.json b/testdata/d2ir/TestCompile/scenarios/multiple-scenario-map.exp.json index 6c2986ff7..2e605908f 100644 --- a/testdata/d2ir/TestCompile/scenarios/multiple-scenario-map.exp.json +++ b/testdata/d2ir/TestCompile/scenarios/multiple-scenario-map.exp.json @@ -1079,11 +1079,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/scenarios/multiple-scenario-map.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/scenarios/multiple-scenario-map.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -2342,11 +2358,27 @@ { "edge_id": { "src_path": [ - "a" + { + "range": "TestCompile/scenarios/multiple-scenario-map.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } ], "src_arrow": false, "dst_path": [ - "b" + { + "range": "TestCompile/scenarios/multiple-scenario-map.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/scenarios/root.exp.json b/testdata/d2ir/TestCompile/scenarios/root.exp.json index 189ae71f1..85d0e8ec1 100644 --- a/testdata/d2ir/TestCompile/scenarios/root.exp.json +++ b/testdata/d2ir/TestCompile/scenarios/root.exp.json @@ -869,11 +869,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/scenarios/root.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/scenarios/root.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1411,11 +1427,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/scenarios/root.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/scenarios/root.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1794,11 +1826,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/scenarios/root.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/scenarios/root.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/steps/recursive.exp.json b/testdata/d2ir/TestCompile/steps/recursive.exp.json index 0afdd842b..1ba1752c1 100644 --- a/testdata/d2ir/TestCompile/steps/recursive.exp.json +++ b/testdata/d2ir/TestCompile/steps/recursive.exp.json @@ -869,11 +869,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/steps/recursive.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/steps/recursive.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -2497,11 +2513,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/steps/recursive.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/steps/recursive.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -2806,11 +2838,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/steps/recursive.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/steps/recursive.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -3351,11 +3399,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/steps/recursive.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/steps/recursive.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, diff --git a/testdata/d2ir/TestCompile/steps/root.exp.json b/testdata/d2ir/TestCompile/steps/root.exp.json index 4cc496405..7cd244a71 100644 --- a/testdata/d2ir/TestCompile/steps/root.exp.json +++ b/testdata/d2ir/TestCompile/steps/root.exp.json @@ -869,11 +869,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/steps/root.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/steps/root.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -1751,11 +1767,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/steps/root.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/steps/root.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0, @@ -2134,11 +2166,27 @@ { "edge_id": { "src_path": [ - "x" + { + "range": "TestCompile/steps/root.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } ], "src_arrow": false, "dst_path": [ - "y" + { + "range": "TestCompile/steps/root.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } ], "dst_arrow": true, "index": 0,