diff --git a/d2ir/compile.go b/d2ir/compile.go index b320dbd18..2c4022edc 100644 --- a/d2ir/compile.go +++ b/d2ir/compile.go @@ -253,8 +253,8 @@ func (c *compiler) updateLinks(m *Map) { if len(bida) != len(aida) { prependIDA := aida[:len(aida)-len(bida)] kp := d2ast.MakeKeyPath(prependIDA) - s := d2format.Format(kp) + "." + f.Primary_.Value.ScalarString() - f.Primary_.Value = d2ast.MakeValueBox(d2ast.RawString(s, true)).ScalarBox().Unbox() + s := d2format.Format(kp) + strings.TrimPrefix(f.Primary_.Value.ScalarString(), "root") + f.Primary_.Value = d2ast.MakeValueBox(d2ast.FlatUnquotedString(s)).ScalarBox().Unbox() } } if f.Map() != nil { @@ -322,7 +322,7 @@ func (c *compiler) compileLink(refctx *RefContext) { // Create the absolute path by appending scope path with value specified scopeIDA = append(scopeIDA, linkIDA...) kp := d2ast.MakeKeyPath(scopeIDA) - refctx.Key.Value = d2ast.MakeValueBox(d2ast.RawString(d2format.Format(kp), true)) + refctx.Key.Value = d2ast.MakeValueBox(d2ast.FlatUnquotedString(d2format.Format(kp))) } func (c *compiler) compileEdges(refctx *RefContext) { diff --git a/e2etests-cli/testdata/TestCLI_E2E/board_import.exp.svg b/e2etests-cli/testdata/TestCLI_E2E/board_import.exp.svg index a10fcfca5..d6ae6c940 100644 --- a/e2etests-cli/testdata/TestCLI_E2E/board_import.exp.svg +++ b/e2etests-cli/testdata/TestCLI_E2E/board_import.exp.svg @@ -1,12 +1,12 @@ -x + .d2-2067460405 .fill-N1{fill:#0A0F25;} + .d2-2067460405 .fill-N2{fill:#676C7E;} + .d2-2067460405 .fill-N3{fill:#9499AB;} + .d2-2067460405 .fill-N4{fill:#CFD2DD;} + .d2-2067460405 .fill-N5{fill:#DEE1EB;} + .d2-2067460405 .fill-N6{fill:#EEF1F8;} + .d2-2067460405 .fill-N7{fill:#FFFFFF;} + .d2-2067460405 .fill-B1{fill:#0D32B2;} + .d2-2067460405 .fill-B2{fill:#0D32B2;} + .d2-2067460405 .fill-B3{fill:#E3E9FD;} + .d2-2067460405 .fill-B4{fill:#E3E9FD;} + .d2-2067460405 .fill-B5{fill:#EDF0FD;} + .d2-2067460405 .fill-B6{fill:#F7F8FE;} + .d2-2067460405 .fill-AA2{fill:#4A6FF3;} + .d2-2067460405 .fill-AA4{fill:#EDF0FD;} + .d2-2067460405 .fill-AA5{fill:#F7F8FE;} + .d2-2067460405 .fill-AB4{fill:#EDF0FD;} + .d2-2067460405 .fill-AB5{fill:#F7F8FE;} + .d2-2067460405 .stroke-N1{stroke:#0A0F25;} + .d2-2067460405 .stroke-N2{stroke:#676C7E;} + .d2-2067460405 .stroke-N3{stroke:#9499AB;} + .d2-2067460405 .stroke-N4{stroke:#CFD2DD;} + .d2-2067460405 .stroke-N5{stroke:#DEE1EB;} + .d2-2067460405 .stroke-N6{stroke:#EEF1F8;} + .d2-2067460405 .stroke-N7{stroke:#FFFFFF;} + .d2-2067460405 .stroke-B1{stroke:#0D32B2;} + .d2-2067460405 .stroke-B2{stroke:#0D32B2;} + .d2-2067460405 .stroke-B3{stroke:#E3E9FD;} + .d2-2067460405 .stroke-B4{stroke:#E3E9FD;} + .d2-2067460405 .stroke-B5{stroke:#EDF0FD;} + .d2-2067460405 .stroke-B6{stroke:#F7F8FE;} + .d2-2067460405 .stroke-AA2{stroke:#4A6FF3;} + .d2-2067460405 .stroke-AA4{stroke:#EDF0FD;} + .d2-2067460405 .stroke-AA5{stroke:#F7F8FE;} + .d2-2067460405 .stroke-AB4{stroke:#EDF0FD;} + .d2-2067460405 .stroke-AB5{stroke:#F7F8FE;} + .d2-2067460405 .background-color-N1{background-color:#0A0F25;} + .d2-2067460405 .background-color-N2{background-color:#676C7E;} + .d2-2067460405 .background-color-N3{background-color:#9499AB;} + .d2-2067460405 .background-color-N4{background-color:#CFD2DD;} + .d2-2067460405 .background-color-N5{background-color:#DEE1EB;} + .d2-2067460405 .background-color-N6{background-color:#EEF1F8;} + .d2-2067460405 .background-color-N7{background-color:#FFFFFF;} + .d2-2067460405 .background-color-B1{background-color:#0D32B2;} + .d2-2067460405 .background-color-B2{background-color:#0D32B2;} + .d2-2067460405 .background-color-B3{background-color:#E3E9FD;} + .d2-2067460405 .background-color-B4{background-color:#E3E9FD;} + .d2-2067460405 .background-color-B5{background-color:#EDF0FD;} + .d2-2067460405 .background-color-B6{background-color:#F7F8FE;} + .d2-2067460405 .background-color-AA2{background-color:#4A6FF3;} + .d2-2067460405 .background-color-AA4{background-color:#EDF0FD;} + .d2-2067460405 .background-color-AA5{background-color:#F7F8FE;} + .d2-2067460405 .background-color-AB4{background-color:#EDF0FD;} + .d2-2067460405 .background-color-AB5{background-color:#F7F8FE;} + .d2-2067460405 .color-N1{color:#0A0F25;} + .d2-2067460405 .color-N2{color:#676C7E;} + .d2-2067460405 .color-N3{color:#9499AB;} + .d2-2067460405 .color-N4{color:#CFD2DD;} + .d2-2067460405 .color-N5{color:#DEE1EB;} + .d2-2067460405 .color-N6{color:#EEF1F8;} + .d2-2067460405 .color-N7{color:#FFFFFF;} + .d2-2067460405 .color-B1{color:#0D32B2;} + .d2-2067460405 .color-B2{color:#0D32B2;} + .d2-2067460405 .color-B3{color:#E3E9FD;} + .d2-2067460405 .color-B4{color:#E3E9FD;} + .d2-2067460405 .color-B5{color:#EDF0FD;} + .d2-2067460405 .color-B6{color:#F7F8FE;} + .d2-2067460405 .color-AA2{color:#4A6FF3;} + .d2-2067460405 .color-AA4{color:#EDF0FD;} + .d2-2067460405 .color-AA5{color:#F7F8FE;} + .d2-2067460405 .color-AB4{color:#EDF0FD;} + .d2-2067460405 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>x @@ -104,7 +104,7 @@ - + diff --git a/testdata/d2compiler/TestCompile/link-board-key-nested.exp.json b/testdata/d2compiler/TestCompile/link-board-key-nested.exp.json index 724803a80..04529700c 100644 --- a/testdata/d2compiler/TestCompile/link-board-key-nested.exp.json +++ b/testdata/d2compiler/TestCompile/link-board-key-nested.exp.json @@ -61,7 +61,7 @@ }, "primary": {}, "value": { - "double_quoted_string": { + "unquoted_string": { "range": ",0:0:0-0:0:0", "value": [ { @@ -359,7 +359,7 @@ }, "primary": {}, "value": { - "double_quoted_string": { + "unquoted_string": { "range": ",0:0:0-0:0:0", "value": [ { diff --git a/testdata/d2compiler/TestCompile/link-board-mixed.exp.json b/testdata/d2compiler/TestCompile/link-board-mixed.exp.json index 6662705c3..b780e2386 100644 --- a/testdata/d2compiler/TestCompile/link-board-mixed.exp.json +++ b/testdata/d2compiler/TestCompile/link-board-mixed.exp.json @@ -70,7 +70,7 @@ }, "primary": {}, "value": { - "double_quoted_string": { + "unquoted_string": { "range": ",0:0:0-0:0:0", "value": [ { @@ -491,7 +491,7 @@ }, "primary": {}, "value": { - "double_quoted_string": { + "unquoted_string": { "range": ",0:0:0-0:0:0", "value": [ { @@ -960,7 +960,7 @@ }, "primary": {}, "value": { - "double_quoted_string": { + "unquoted_string": { "range": ",0:0:0-0:0:0", "value": [ { diff --git a/testdata/d2compiler/TestCompile/link-board-nested.exp.json b/testdata/d2compiler/TestCompile/link-board-nested.exp.json index 8a9f54bb9..257d2c3bf 100644 --- a/testdata/d2compiler/TestCompile/link-board-nested.exp.json +++ b/testdata/d2compiler/TestCompile/link-board-nested.exp.json @@ -37,7 +37,7 @@ }, "primary": {}, "value": { - "double_quoted_string": { + "unquoted_string": { "range": ",0:0:0-0:0:0", "value": [ { @@ -317,7 +317,7 @@ }, "primary": {}, "value": { - "double_quoted_string": { + "unquoted_string": { "range": ",0:0:0-0:0:0", "value": [ { @@ -535,7 +535,7 @@ }, "primary": {}, "value": { - "double_quoted_string": { + "unquoted_string": { "range": ",0:0:0-0:0:0", "value": [ { diff --git a/testdata/d2compiler/TestCompile/link-board-ok.exp.json b/testdata/d2compiler/TestCompile/link-board-ok.exp.json index 30f8ff5c6..f94c17553 100644 --- a/testdata/d2compiler/TestCompile/link-board-ok.exp.json +++ b/testdata/d2compiler/TestCompile/link-board-ok.exp.json @@ -37,7 +37,7 @@ }, "primary": {}, "value": { - "double_quoted_string": { + "unquoted_string": { "range": ",0:0:0-0:0:0", "value": [ { @@ -259,7 +259,7 @@ }, "primary": {}, "value": { - "double_quoted_string": { + "unquoted_string": { "range": ",0:0:0-0:0:0", "value": [ { diff --git a/testdata/d2compiler/TestCompile/link-board-underscore.exp.json b/testdata/d2compiler/TestCompile/link-board-underscore.exp.json index 9cee45ad8..f84251f05 100644 --- a/testdata/d2compiler/TestCompile/link-board-underscore.exp.json +++ b/testdata/d2compiler/TestCompile/link-board-underscore.exp.json @@ -179,7 +179,7 @@ }, "primary": {}, "value": { - "double_quoted_string": { + "unquoted_string": { "range": ",0:0:0-0:0:0", "value": [ { @@ -222,7 +222,7 @@ }, "primary": {}, "value": { - "double_quoted_string": { + "unquoted_string": { "range": ",0:0:0-0:0:0", "value": [ { @@ -511,7 +511,7 @@ }, "primary": {}, "value": { - "double_quoted_string": { + "unquoted_string": { "range": ",0:0:0-0:0:0", "value": [ { @@ -554,7 +554,7 @@ }, "primary": {}, "value": { - "double_quoted_string": { + "unquoted_string": { "range": ",0:0:0-0:0:0", "value": [ { @@ -843,7 +843,7 @@ }, "primary": {}, "value": { - "double_quoted_string": { + "unquoted_string": { "range": ",0:0:0-0:0:0", "value": [ { @@ -886,7 +886,7 @@ }, "primary": {}, "value": { - "double_quoted_string": { + "unquoted_string": { "range": ",0:0:0-0:0:0", "value": [ { diff --git a/testdata/d2ir/TestCompile/imports/boards.exp.json b/testdata/d2ir/TestCompile/imports/boards.exp.json new file mode 100644 index 000000000..6b5e2d61c --- /dev/null +++ b/testdata/d2ir/TestCompile/imports/boards.exp.json @@ -0,0 +1,817 @@ +{ + "fields": [ + { + "name": "x", + "composite": { + "fields": [ + { + "name": "link", + "primary": { + "value": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "root.layers.x" + } + ] + } + }, + "references": [ + { + "string": { + "range": "index.d2,0:2:2-0:6:6", + "value": [ + { + "string": "link", + "raw_string": "link" + } + ] + }, + "key_path": { + "range": "index.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "index.d2,0:2:2-0:6:6", + "value": [ + { + "string": "link", + "raw_string": "link" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "index.d2,0:0:0-0:16:16", + "key": { + "range": "index.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "index.d2,0:2:2-0:6:6", + "value": [ + { + "string": "link", + "raw_string": "link" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "root.layers.x" + } + ] + } + } + } + } + } + ] + } + ], + "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:6:6", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "index.d2,0:2:2-0:6:6", + "value": [ + { + "string": "link", + "raw_string": "link" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "index.d2,0:0:0-0:16:16", + "key": { + "range": "index.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "index.d2,0:2:2-0:6:6", + "value": [ + { + "string": "link", + "raw_string": "link" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "root.layers.x" + } + ] + } + } + } + } + } + ] + }, + { + "name": "layers", + "composite": { + "fields": [ + { + "name": "x", + "composite": { + "fields": [ + { + "name": "y", + "composite": { + "fields": [ + { + "name": "link", + "primary": { + "value": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "root.layers.x.layers.y" + } + ] + } + }, + "references": [ + { + "string": { + "range": "x.d2,0:2:2-0:6:6", + "value": [ + { + "string": "link", + "raw_string": "link" + } + ] + }, + "key_path": { + "range": "x.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "x.d2,0:0:0-0:1:1", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + }, + { + "unquoted_string": { + "range": "x.d2,0:2:2-0:6:6", + "value": [ + { + "string": "link", + "raw_string": "link" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "x.d2,0:0:0-0:16:16", + "key": { + "range": "x.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "x.d2,0:0:0-0:1:1", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + }, + { + "unquoted_string": { + "range": "x.d2,0:2:2-0:6:6", + "value": [ + { + "string": "link", + "raw_string": "link" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "root.layers.y" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "x.d2,0:0:0-0:1:1", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + }, + "key_path": { + "range": "x.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "x.d2,0:0:0-0:1:1", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + }, + { + "unquoted_string": { + "range": "x.d2,0:2:2-0:6:6", + "value": [ + { + "string": "link", + "raw_string": "link" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "x.d2,0:0:0-0:16:16", + "key": { + "range": "x.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "x.d2,0:0:0-0:1:1", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + }, + { + "unquoted_string": { + "range": "x.d2,0:2:2-0:6:6", + "value": [ + { + "string": "link", + "raw_string": "link" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "root.layers.y" + } + ] + } + } + } + } + } + ] + }, + { + "name": "layers", + "composite": { + "fields": [ + { + "name": "y", + "composite": { + "fields": [ + { + "name": "meow", + "references": [ + { + "string": { + "range": "y.d2,0:0:0-0:4:4", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + }, + "key_path": { + "range": "y.d2,0:0:0-0:4:4", + "path": [ + { + "unquoted_string": { + "range": "y.d2,0:0:0-0:4:4", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "y.d2,0:0:0-0:4:4", + "key": { + "range": "y.d2,0:0:0-0:4:4", + "path": [ + { + "unquoted_string": { + "range": "y.d2,0:0:0-0:4:4", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "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" + } + ] + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "x.d2,0:18:18-0:24:24", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + }, + "key_path": { + "range": "x.d2,0:18:18-0:24:24", + "path": [ + { + "unquoted_string": { + "range": "x.d2,0:18:18-0:24:24", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "x.d2,0:18:18-0:35:35", + "key": { + "range": "x.d2,0:18:18-0:24:24", + "path": [ + { + "unquoted_string": { + "range": "x.d2,0:18:18-0:24:24", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "x.d2,0:26:26-0:35:35", + "nodes": [ + { + "map_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" + } + ] + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "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" + } + ] + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "index.d2,0:18:18-0:24:24", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + }, + "key_path": { + "range": "index.d2,0:18:18-0:24:24", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:18:18-0:24:24", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "index.d2,0:18:18-0:35:35", + "key": { + "range": "index.d2,0:18:18-0:24:24", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:18:18-0:24:24", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "index.d2,0:26:26-0:35:35", + "nodes": [ + { + "map_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" + } + ] + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null +}