diff --git a/testdata/d2ir/TestCompile/imports/boards-deep.exp.json b/testdata/d2ir/TestCompile/imports/boards-deep.exp.json index 892926586..2ea3a94a1 100644 --- a/testdata/d2ir/TestCompile/imports/boards-deep.exp.json +++ b/testdata/d2ir/TestCompile/imports/boards-deep.exp.json @@ -775,6 +775,78 @@ "edges": null }, "references": [ + { + "string": { + "range": "c.d2,0:28:28-0:29:29", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + }, + "key_path": { + "range": "c.d2,0:28:28-0:29:29", + "path": [ + { + "unquoted_string": { + "range": "c.d2,0:28:28-0:29:29", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "c.d2,0:28:28-0:34:34", + "key": { + "range": "c.d2,0:28:28-0:29:29", + "path": [ + { + "unquoted_string": { + "range": "c.d2,0:28:28-0:29:29", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "import": { + "range": "c.d2,0:31:31-0:34:34", + "spread": false, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "c.d2,0:32:32-0:33:33", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, { "string": { "range": "c.d2,0:28:28-0:29:29", @@ -960,6 +1032,78 @@ "edges": null }, "references": [ + { + "string": { + "range": "b.d2,0:28:28-0:29:29", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + }, + "key_path": { + "range": "b.d2,0:28:28-0:29:29", + "path": [ + { + "unquoted_string": { + "range": "b.d2,0:28:28-0:29:29", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "b.d2,0:28:28-0:34:34", + "key": { + "range": "b.d2,0:28:28-0:29:29", + "path": [ + { + "unquoted_string": { + "range": "b.d2,0:28:28-0:29:29", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "import": { + "range": "b.d2,0:31:31-0:34:34", + "spread": false, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "b.d2,0:32:32-0:33:33", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, { "string": { "range": "b.d2,0:28:28-0:29:29", @@ -1145,6 +1289,78 @@ "edges": null }, "references": [ + { + "string": { + "range": "index.d2,0:28:28-0:29:29", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + }, + "key_path": { + "range": "index.d2,0:28:28-0:29:29", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:28:28-0:29:29", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "index.d2,0:28:28-0:34:34", + "key": { + "range": "index.d2,0:28:28-0:29:29", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:28:28-0:29:29", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "import": { + "range": "index.d2,0:31:31-0:34:34", + "spread": false, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:32:32-0:33:33", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, { "string": { "range": "index.d2,0:28:28-0:29:29", diff --git a/testdata/d2ir/TestCompile/imports/boards.exp.json b/testdata/d2ir/TestCompile/imports/boards.exp.json index c2e7e9a19..e2cd8d6b4 100644 --- a/testdata/d2ir/TestCompile/imports/boards.exp.json +++ b/testdata/d2ir/TestCompile/imports/boards.exp.json @@ -540,6 +540,78 @@ "edges": null }, "references": [ + { + "string": { + "range": "x.d2,0:28:28-0:29:29", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + }, + "key_path": { + "range": "x.d2,0:28:28-0:29:29", + "path": [ + { + "unquoted_string": { + "range": "x.d2,0:28:28-0:29:29", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "x.d2,0:28:28-0:34:34", + "key": { + "range": "x.d2,0:28:28-0:29:29", + "path": [ + { + "unquoted_string": { + "range": "x.d2,0:28:28-0:29:29", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "import": { + "range": "x.d2,0:31:31-0:34:34", + "spread": false, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "x.d2,0:32:32-0:33:33", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, { "string": { "range": "x.d2,0:28:28-0:29:29", @@ -725,6 +797,78 @@ "edges": null }, "references": [ + { + "string": { + "range": "index.d2,0:28:28-0:29:29", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "index.d2,0:28:28-0:29:29", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:28:28-0:29:29", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "index.d2,0:28:28-0:34:34", + "key": { + "range": "index.d2,0:28:28-0:29:29", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:28:28-0:29:29", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "import": { + "range": "index.d2,0:31:31-0:34:34", + "spread": false, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:32:32-0:33:33", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, { "string": { "range": "index.d2,0:28:28-0:29:29", diff --git a/testdata/d2ir/TestCompile/imports/nested/array.exp.json b/testdata/d2ir/TestCompile/imports/nested/array.exp.json index 7081d05e0..e06ff2377 100644 --- a/testdata/d2ir/TestCompile/imports/nested/array.exp.json +++ b/testdata/d2ir/TestCompile/imports/nested/array.exp.json @@ -26,6 +26,89 @@ ] }, "references": [ + { + "string": { + "range": "index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "index.d2,0:0:0-0:7:7", + "key": { + "range": "index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "import": { + "range": "index.d2,0:3:3-0:7:7", + "spread": false, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:4:4-0:5:5", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "index.d2,0:6:6-0:7:7", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, { "string": { "range": "index.d2,0:0:0-0:1:1", diff --git a/testdata/d2ir/TestCompile/imports/nested/map.exp.json b/testdata/d2ir/TestCompile/imports/nested/map.exp.json index 39559df56..6efbc25c3 100644 --- a/testdata/d2ir/TestCompile/imports/nested/map.exp.json +++ b/testdata/d2ir/TestCompile/imports/nested/map.exp.json @@ -190,6 +190,89 @@ "edges": null }, "references": [ + { + "string": { + "range": "index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "index.d2,0:0:0-0:7:7", + "key": { + "range": "index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "import": { + "range": "index.d2,0:3:3-0:7:7", + "spread": false, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:4:4-0:5:5", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "index.d2,0:6:6-0:7:7", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, { "string": { "range": "index.d2,0:0:0-0:1:1", diff --git a/testdata/d2ir/TestCompile/imports/nested/scalar.exp.json b/testdata/d2ir/TestCompile/imports/nested/scalar.exp.json index 76558fb51..0d42ee494 100644 --- a/testdata/d2ir/TestCompile/imports/nested/scalar.exp.json +++ b/testdata/d2ir/TestCompile/imports/nested/scalar.exp.json @@ -22,6 +22,89 @@ } }, "references": [ + { + "string": { + "range": "index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "index.d2,0:0:0-0:7:7", + "key": { + "range": "index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "import": { + "range": "index.d2,0:3:3-0:7:7", + "spread": false, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:4:4-0:5:5", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "index.d2,0:6:6-0:7:7", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, { "string": { "range": "index.d2,0:0:0-0:1:1", diff --git a/testdata/d2ir/TestCompile/imports/pattern-value.exp.json b/testdata/d2ir/TestCompile/imports/pattern-value.exp.json index f4753c9c5..a40689479 100644 --- a/testdata/d2ir/TestCompile/imports/pattern-value.exp.json +++ b/testdata/d2ir/TestCompile/imports/pattern-value.exp.json @@ -10,9 +10,6 @@ } ] }, - "primary": { - "value": null - }, "composite": { "fields": [ { @@ -193,6 +190,59 @@ "edges": null }, "references": [ + { + "string": { + "range": "index.d2,0:0:0-0:11:11", + "value": [ + { + "string": "userWebsite", + "raw_string": "userWebsite" + } + ] + }, + "key_path": { + "range": "index.d2,0:0:0-0:11:11", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:0:0-0:11:11", + "value": [ + { + "string": "userWebsite", + "raw_string": "userWebsite" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "index.d2,0:0:0-0:11:11", + "key": { + "range": "index.d2,0:0:0-0:11:11", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:0:0-0:11:11", + "value": [ + { + "string": "userWebsite", + "raw_string": "userWebsite" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, { "string": { "range": "index.d2,0:0:0-0:11:11", @@ -258,9 +308,6 @@ } ] }, - "primary": { - "value": null - }, "composite": { "fields": [ { @@ -441,6 +488,59 @@ "edges": null }, "references": [ + { + "string": { + "range": "index.d2,1:0:12-1:10:22", + "value": [ + { + "string": "userMobile", + "raw_string": "userMobile" + } + ] + }, + "key_path": { + "range": "index.d2,1:0:12-1:10:22", + "path": [ + { + "unquoted_string": { + "range": "index.d2,1:0:12-1:10:22", + "value": [ + { + "string": "userMobile", + "raw_string": "userMobile" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "index.d2,1:0:12-1:10:22", + "key": { + "range": "index.d2,1:0:12-1:10:22", + "path": [ + { + "unquoted_string": { + "range": "index.d2,1:0:12-1:10:22", + "value": [ + { + "string": "userMobile", + "raw_string": "userMobile" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, { "string": { "range": "index.d2,1:0:12-1:10:22", diff --git a/testdata/d2ir/TestCompile/imports/steps-inheritence.exp.json b/testdata/d2ir/TestCompile/imports/steps-inheritence.exp.json index 12e600fb8..3f542c369 100644 --- a/testdata/d2ir/TestCompile/imports/steps-inheritence.exp.json +++ b/testdata/d2ir/TestCompile/imports/steps-inheritence.exp.json @@ -226,6 +226,78 @@ "edges": null }, "references": [ + { + "string": { + "range": "index.d2,0:41:41-0:42:42", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "index.d2,0:41:41-0:42:42", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:41:41-0:42:42", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "index.d2,0:41:41-0:46:46", + "key": { + "range": "index.d2,0:41:41-0:42:42", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:41:41-0:42:42", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "import": { + "range": "index.d2,0:44:44-0:46:46", + "spread": false, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:45:45-0:46:46", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, { "string": { "range": "index.d2,0:41:41-0:42:42", @@ -448,6 +520,78 @@ "edges": null }, "references": [ + { + "string": { + "range": "index.d2,0:48:48-0:49:49", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + }, + "key_path": { + "range": "index.d2,0:48:48-0:49:49", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:48:48-0:49:49", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "index.d2,0:48:48-0:54:54", + "key": { + "range": "index.d2,0:48:48-0:49:49", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:48:48-0:49:49", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "import": { + "range": "index.d2,0:51:51-0:54:54", + "spread": false, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:52:52-0:53:53", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, { "string": { "range": "index.d2,0:48:48-0:49:49", @@ -831,6 +975,78 @@ "edges": null }, "references": [ + { + "string": { + "range": "index.d2,0:12:12-0:13:13", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + }, + "key_path": { + "range": "index.d2,0:12:12-0:13:13", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:12:12-0:13:13", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "index.d2,0:12:12-0:17:17", + "key": { + "range": "index.d2,0:12:12-0:13:13", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:12:12-0:13:13", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "import": { + "range": "index.d2,0:15:15-0:17:17", + "spread": false, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:16:16-0:17:17", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, { "string": { "range": "index.d2,0:12:12-0:13:13", @@ -1119,6 +1335,78 @@ "edges": null }, "references": [ + { + "string": { + "range": "index.d2,0:19:19-0:20:20", + "value": [ + { + "string": "2", + "raw_string": "2" + } + ] + }, + "key_path": { + "range": "index.d2,0:19:19-0:20:20", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:19:19-0:20:20", + "value": [ + { + "string": "2", + "raw_string": "2" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "index.d2,0:19:19-0:25:25", + "key": { + "range": "index.d2,0:19:19-0:20:20", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:19:19-0:20:20", + "value": [ + { + "string": "2", + "raw_string": "2" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "import": { + "range": "index.d2,0:22:22-0:25:25", + "spread": false, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:23:23-0:24:24", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, { "string": { "range": "index.d2,0:19:19-0:20:20", diff --git a/testdata/d2ir/TestCompile/imports/value.exp.json b/testdata/d2ir/TestCompile/imports/value.exp.json index 64186e6af..fa8af8371 100644 --- a/testdata/d2ir/TestCompile/imports/value.exp.json +++ b/testdata/d2ir/TestCompile/imports/value.exp.json @@ -190,6 +190,78 @@ "edges": null }, "references": [ + { + "string": { + "range": "index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "index.d2,0:0:0-0:8:8", + "key": { + "range": "index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "import": { + "range": "index.d2,0:3:3-0:8:8", + "spread": false, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:4:4-0:5:5", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, { "string": { "range": "index.d2,0:0:0-0:1:1", diff --git a/testdata/d2oracle/TestSet/import/6.exp.json b/testdata/d2oracle/TestSet/import/6.exp.json index 7c2f2b3e6..9b0e876c3 100644 --- a/testdata/d2oracle/TestSet/import/6.exp.json +++ b/testdata/d2oracle/TestSet/import/6.exp.json @@ -334,6 +334,26 @@ "key_path_index": 0, "map_key_edge_index": -1 }, + { + "key": { + "range": "index.d2,1:0:2-1:1:3", + "path": [ + { + "unquoted_string": { + "range": "index.d2,1:0:2-1:1:3", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + }, { "key": { "range": "index.d2,2:0:9-2:14:23",