From 305c72d23959556ced90fca45ed0931ec6cf554e Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Mon, 6 Feb 2023 13:32:08 -0800 Subject: [PATCH] implement classes --- ci/release/changelogs/next.md | 5 + d2compiler/compile.go | 72 +- d2compiler/compile_test.go | 94 + d2exporter/export.go | 2 + d2graph/d2graph.go | 6 + d2ir/compile.go | 42 + d2ir/compile_test.go | 154 + d2ir/d2ir.go | 23 + d2renderers/d2svg/d2svg.go | 13 +- d2target/d2target.go | 4 + e2etests/regression_test.go | 8 +- e2etests/stable_test.go | 35 +- .../dagre/board.exp.json | 6 +- .../dagre/sketch.exp.svg | 158 +- .../elk/board.exp.json | 6 +- .../elk/sketch.exp.svg | 158 +- .../dagre/board.exp.json | 6 +- .../dagre/sketch.exp.svg | 166 +- .../elk/board.exp.json | 6 +- .../elk/sketch.exp.svg | 166 +- .../stable/classes/dagre/board.exp.json | 284 + .../stable/classes/dagre/sketch.exp.svg | 103 + .../stable/classes/elk/board.exp.json | 266 + .../stable/classes/elk/sketch.exp.svg | 103 + .../unnamed_only_height/dagre/board.exp.json | 6 +- .../unnamed_only_height/dagre/sketch.exp.svg | 166 +- .../unnamed_only_height/elk/board.exp.json | 6 +- .../unnamed_only_height/elk/sketch.exp.svg | 166 +- .../unnamed_only_width/dagre/board.exp.json | 6 +- .../unnamed_only_width/dagre/sketch.exp.svg | 166 +- .../unnamed_only_width/elk/board.exp.json | 6 +- .../unnamed_only_width/elk/sketch.exp.svg | 166 +- .../dagre/board.exp.json | 14 +- .../dagre/sketch.exp.svg | 192 +- .../shape_set_width_height/elk/board.exp.json | 14 +- .../shape_set_width_height/elk/sketch.exp.svg | 192 +- e2etests/todo_test.go | 4 +- .../classes-internal-edge.exp.json | 12 + .../TestCompile/classes-unreserved.exp.json | 12 + .../d2compiler/TestCompile/classes.exp.json | 907 ++ .../TestCompile/missing-class.exp.json | 145 + .../no-class-inside-classes.exp.json | 12 + .../TestCompile/no-class-primary.exp.json | 12 + .../TestCompile/reordered-classes.exp.json | 291 + .../d2ir/TestCompile/classes/basic.exp.json | 504 + .../TestCompile/classes/inherited.exp.json | 9684 +++++++++++++++++ .../TestCompile/classes/layer-modify.exp.json | 1583 +++ .../classes/merge-classes.exp.json | 1202 ++ .../d2ir/TestCompile/classes/merge.exp.json | 1625 +++ .../d2ir/TestCompile/classes/nested.exp.json | 1924 ++++ .../classes/nonroot-class.exp.json | 617 ++ 51 files changed, 20609 insertions(+), 911 deletions(-) create mode 100644 e2etests/testdata/stable/classes/dagre/board.exp.json create mode 100644 e2etests/testdata/stable/classes/dagre/sketch.exp.svg create mode 100644 e2etests/testdata/stable/classes/elk/board.exp.json create mode 100644 e2etests/testdata/stable/classes/elk/sketch.exp.svg create mode 100644 testdata/d2compiler/TestCompile/classes-internal-edge.exp.json create mode 100644 testdata/d2compiler/TestCompile/classes-unreserved.exp.json create mode 100644 testdata/d2compiler/TestCompile/classes.exp.json create mode 100644 testdata/d2compiler/TestCompile/missing-class.exp.json create mode 100644 testdata/d2compiler/TestCompile/no-class-inside-classes.exp.json create mode 100644 testdata/d2compiler/TestCompile/no-class-primary.exp.json create mode 100644 testdata/d2compiler/TestCompile/reordered-classes.exp.json create mode 100644 testdata/d2ir/TestCompile/classes/basic.exp.json create mode 100644 testdata/d2ir/TestCompile/classes/inherited.exp.json create mode 100644 testdata/d2ir/TestCompile/classes/layer-modify.exp.json create mode 100644 testdata/d2ir/TestCompile/classes/merge-classes.exp.json create mode 100644 testdata/d2ir/TestCompile/classes/merge.exp.json create mode 100644 testdata/d2ir/TestCompile/classes/nested.exp.json create mode 100644 testdata/d2ir/TestCompile/classes/nonroot-class.exp.json diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 79e5b383d..ff62787a6 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -1,6 +1,7 @@ #### Features 🚀 - Container with constant key near attribute now can have descendant objects and connections [#1071](https://github.com/terrastruct/d2/pull/1071) +- Classes are implemented. See [docs](https://d2lang.com/todo). [#772](https://github.com/terrastruct/d2/pull/772) - Multi-board SVG outputs with internal links go to their output paths [#1116](https://github.com/terrastruct/d2/pull/1116) - New grid layout to place nodes in rows and columns [#1122](https://github.com/terrastruct/d2/pull/1122) @@ -17,3 +18,7 @@ - Namespace transitions so that multiple animated D2 diagrams can exist on the same page [#1123](https://github.com/terrastruct/d2/issues/1123) - Fix a bug in vertical alignment of appendix lines [#1104](https://github.com/terrastruct/d2/issues/1104) - Fix precision difference for sketch mode running on different architectures [#921](https://github.com/terrastruct/d2/issues/921) + +#### Breaking changes + +- `class` and `classes` are now reserved keywords. diff --git a/d2compiler/compile.go b/d2compiler/compile.go index 3050a19f8..99c0de355 100644 --- a/d2compiler/compile.go +++ b/d2compiler/compile.go @@ -116,8 +116,7 @@ func (c *compiler) compileBoardsField(g *d2graph.Graph, ir *d2ir.Map, fieldName } type compiler struct { - inEdgeGroup bool - err d2parser.ParseError + err d2parser.ParseError } func (c *compiler) errorf(n d2ast.Node, f string, v ...interface{}) { @@ -125,6 +124,18 @@ func (c *compiler) errorf(n d2ast.Node, f string, v ...interface{}) { } func (c *compiler) compileMap(obj *d2graph.Object, m *d2ir.Map) { + class := m.GetField("class") + if class != nil { + className := class.Primary() + if className == nil { + c.errorf(class.LastRef().AST(), "class missing value") + } else { + classMap := m.GetClassMap(className.String()) + if classMap != nil { + c.compileMap(obj, classMap) + } + } + } shape := m.GetField("shape") if shape != nil { c.compileField(obj, shape) @@ -159,7 +170,27 @@ func (c *compiler) compileField(obj *d2graph.Object, f *d2ir.Field) { return } _, isReserved := d2graph.SimpleReservedKeywords[keyword] - if isReserved { + if f.Name == "classes" { + if f.Map() != nil { + if len(f.Map().Edges) > 0 { + c.errorf(f.Map().Edges[0].LastRef().AST(), "classes cannot contain an edge") + } + for _, classesField := range f.Map().Fields { + if classesField.Map() == nil { + continue + } + for _, cf := range classesField.Map().Fields { + if _, ok := d2graph.ReservedKeywords[cf.Name]; !ok { + c.errorf(cf.LastRef().AST(), "%s is an invalid class field, must be reserved keyword", cf.Name) + } + if cf.Name == "class" { + c.errorf(cf.LastRef().AST(), `"class" cannot appear within "classes"`) + } + } + } + } + return + } else if isReserved { c.compileReserved(obj.Attributes, f) return } else if f.Name == "style" { @@ -389,6 +420,9 @@ func (c *compiler) compileReserved(attrs *d2graph.Attributes, f *d2ir.Field) { attrs.GridColumns = &d2graph.Scalar{} attrs.GridColumns.Value = scalar.ScalarString() attrs.GridColumns.MapKey = f.LastPrimaryKey() + case "class": + attrs.Classes = append(attrs.Classes, scalar.ScalarString()) + case "classes": } if attrs.Link != nil && attrs.Tooltip != nil { @@ -480,14 +514,7 @@ func (c *compiler) compileEdge(obj *d2graph.Object, e *d2ir.Edge) { c.compileLabel(edge.Attributes, e) } if e.Map() != nil { - for _, f := range e.Map().Fields { - _, ok := d2graph.ReservedKeywords[f.Name] - if !ok { - c.errorf(f.References[0].AST(), `edge map keys must be reserved keywords`) - continue - } - c.compileEdgeField(edge, f) - } + c.compileEdgeMap(edge, e.Map()) } edge.Attributes.Label.MapKey = e.LastPrimaryKey() @@ -504,6 +531,29 @@ func (c *compiler) compileEdge(obj *d2graph.Object, e *d2ir.Edge) { } } +func (c *compiler) compileEdgeMap(edge *d2graph.Edge, m *d2ir.Map) { + class := m.GetField("class") + if class != nil { + className := class.Primary() + if className == nil { + c.errorf(class.LastRef().AST(), "class missing value") + } else { + classMap := m.GetClassMap(className.String()) + if classMap != nil { + c.compileEdgeMap(edge, classMap) + } + } + } + for _, f := range m.Fields { + _, ok := d2graph.ReservedKeywords[f.Name] + if !ok { + c.errorf(f.References[0].AST(), `edge map keys must be reserved keywords`) + continue + } + c.compileEdgeField(edge, f) + } +} + func (c *compiler) compileEdgeField(edge *d2graph.Edge, f *d2ir.Field) { keyword := strings.ToLower(f.Name) _, isStyleReserved := d2graph.StyleKeywords[keyword] diff --git a/d2compiler/compile_test.go b/d2compiler/compile_test.go index 0080b713c..bb26d78f8 100644 --- a/d2compiler/compile_test.go +++ b/d2compiler/compile_test.go @@ -2320,6 +2320,100 @@ d2/testdata/d2compiler/TestCompile/grid_edge.d2:6:2: edges in grid diagrams are expErr: `d2/testdata/d2compiler/TestCompile/grid_nested.d2:2:2: "grid-rows" can only be used on containers with one level of nesting right now. ("hey.d" has nested "invalid descendant") d2/testdata/d2compiler/TestCompile/grid_nested.d2:3:2: "grid-columns" can only be used on containers with one level of nesting right now. ("hey.d" has nested "invalid descendant")`, }, + { + name: "classes", + text: `classes: { + dragon_ball: { + label: "" + shape: circle + style.fill: orange + } + path: { + label: "then" + style.stroke-width: 4 + } +} +nostar: { class: dragon_ball } +1star: "*" { class: dragon_ball; style.fill: red } +2star: { label: "**"; class: dragon_ball } + +nostar -> 1star: { class: path } +`, + assertions: func(t *testing.T, g *d2graph.Graph) { + tassert.Equal(t, 3, len(g.Objects)) + tassert.Equal(t, "dragon_ball", g.Objects[0].Attributes.Classes[0]) + tassert.Equal(t, "", g.Objects[0].Attributes.Label.Value) + // Class field overrides primary + tassert.Equal(t, "", g.Objects[1].Attributes.Label.Value) + tassert.Equal(t, "**", g.Objects[2].Attributes.Label.Value) + tassert.Equal(t, "orange", g.Objects[0].Attributes.Style.Fill.Value) + tassert.Equal(t, "red", g.Objects[1].Attributes.Style.Fill.Value) + + tassert.Equal(t, "4", g.Edges[0].Attributes.Style.StrokeWidth.Value) + tassert.Equal(t, "then", g.Edges[0].Attributes.Label.Value) + }, + }, + { + name: "reordered-classes", + text: `classes: { + x: { + shape: circle + } +} +a.class: x +classes.x.shape: diamond +`, + assertions: func(t *testing.T, g *d2graph.Graph) { + tassert.Equal(t, 1, len(g.Objects)) + tassert.Equal(t, "diamond", g.Objects[0].Attributes.Shape.Value) + }, + }, + { + name: "no-class-primary", + text: `x.class +`, + expErr: `d2/testdata/d2compiler/TestCompile/no-class-primary.d2:1:3: class missing value`, + }, + { + name: "no-class-inside-classes", + text: `classes: { + x: { + class: y + } +} +`, + expErr: `d2/testdata/d2compiler/TestCompile/no-class-inside-classes.d2:3:5: "class" cannot appear within "classes"`, + }, + { + // This is okay + name: "missing-class", + text: `x.class: yo +`, + }, + { + name: "classes-unreserved", + text: `classes: { + mango: { + seed + } +} +`, + expErr: `d2/testdata/d2compiler/TestCompile/classes-unreserved.d2:3:5: seed is an invalid class field, must be reserved keyword`, + }, + { + name: "classes-internal-edge", + text: `classes: { + mango: { + width: 100 + } + jango: { + height: 100 + } + mango -> jango +} +`, + expErr: `d2/testdata/d2compiler/TestCompile/classes-internal-edge.d2:8:3: classes cannot contain an edge`, + }, } for _, tc := range testCases { diff --git a/d2exporter/export.go b/d2exporter/export.go index 8524e7542..671527be3 100644 --- a/d2exporter/export.go +++ b/d2exporter/export.go @@ -129,6 +129,7 @@ func toShape(obj *d2graph.Object, theme *d2themes.Theme) d2target.Shape { shape := d2target.BaseShape() shape.SetType(obj.Attributes.Shape.Value) shape.ID = obj.AbsID() + shape.Classes = obj.Attributes.Classes shape.ZIndex = obj.ZIndex shape.Level = int(obj.Level()) shape.Pos = d2target.NewPoint(int(obj.TopLeft.X), int(obj.TopLeft.Y)) @@ -194,6 +195,7 @@ func toShape(obj *d2graph.Object, theme *d2themes.Theme) d2target.Shape { func toConnection(edge *d2graph.Edge, theme *d2themes.Theme) d2target.Connection { connection := d2target.BaseConnection() connection.ID = edge.AbsID() + connection.Classes = edge.Attributes.Classes connection.ZIndex = edge.ZIndex text := edge.Text() diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go index 64f1aaebf..e6e9de6b4 100644 --- a/d2graph/d2graph.go +++ b/d2graph/d2graph.go @@ -135,6 +135,10 @@ type Attributes struct { GridRows *Scalar `json:"gridRows,omitempty"` GridColumns *Scalar `json:"gridColumns,omitempty"` + + // These names are attached to the rendered elements in SVG + // so that users can target them however they like outside of D2 + Classes []string `json:"classes,omitempty"` } // TODO references at the root scope should have their Scope set to root graph AST @@ -1556,6 +1560,8 @@ var SimpleReservedKeywords = map[string]struct{}{ "left": {}, "grid-rows": {}, "grid-columns": {}, + "class": {}, + "classes": {}, } // ReservedKeywordHolders are reserved keywords that are meaningless on its own and exist solely to hold a set of reserved keywords diff --git a/d2ir/compile.go b/d2ir/compile.go index 801529960..a1723464b 100644 --- a/d2ir/compile.go +++ b/d2ir/compile.go @@ -22,12 +22,50 @@ func Compile(ast *d2ast.Map) (*Map, error) { m.initRoot() m.parent.(*Field).References[0].Context.Scope = ast c.compileMap(m, ast) + c.compileClasses(m) if !c.err.Empty() { return nil, c.err } return m, nil } +func (c *compiler) compileClasses(m *Map) { + classes := m.GetField("classes") + if classes == nil || classes.Map() == nil { + return + } + + layersField := m.GetField("layers") + if layersField == nil { + return + } + layers := layersField.Map() + if layers == nil { + return + } + + for _, lf := range layers.Fields { + if lf.Map() == nil || lf.Primary() != nil { + c.errorf(lf.References[0].Context.Key, "invalid layer") + continue + } + l := lf.Map() + lClasses := l.GetField("classes") + + if lClasses == nil { + lClasses = classes.Copy(l).(*Field) + l.Fields = append(l.Fields, lClasses) + } else { + base := classes.Copy(l).(*Field) + OverlayMap(base.Map(), lClasses.Map()) + l.DeleteField("classes") + l.Fields = append(l.Fields, base) + } + + c.compileClasses(l) + } +} + func (c *compiler) overlay(base *Map, f *Field) { if f.Map() == nil || f.Primary() != nil { c.errorf(f.References[0].Context.Key, "invalid %s", NodeBoardKind(f)) @@ -103,6 +141,10 @@ func (c *compiler) compileField(dst *Map, kp *d2ast.KeyPath, refctx *RefContext) } } c.compileMap(f.Map(), refctx.Key.Value.Map) + switch NodeBoardKind(f) { + case BoardScenario, BoardStep: + c.compileClasses(f.Map()) + } } else if refctx.Key.Value.ScalarBox().Unbox() != nil { // If the link is a board, we need to transform it into an absolute path. if f.Name == "link" { diff --git a/d2ir/compile_test.go b/d2ir/compile_test.go index 6a97d415b..b9fc2250d 100644 --- a/d2ir/compile_test.go +++ b/d2ir/compile_test.go @@ -19,6 +19,7 @@ func TestCompile(t *testing.T) { t.Parallel() t.Run("fields", testCompileFields) + t.Run("classes", testCompileClasses) t.Run("edges", testCompileEdges) t.Run("layers", testCompileLayers) t.Run("scenarios", testCompileScenarios) @@ -101,10 +102,12 @@ func makeScalar(v interface{}) *d2ir.Scalar { bv := &big.Rat{} bv.SetFloat64(v) s.Value = &d2ast.Number{ + Raw: fmt.Sprint(v), Value: bv, } case int: s.Value = &d2ast.Number{ + Raw: fmt.Sprint(v), Value: big.NewRat(int64(v), 1), } case string: @@ -503,3 +506,154 @@ steps: { } runa(t, tca) } + +func testCompileClasses(t *testing.T) { + t.Parallel() + tca := []testCase{ + { + name: "basic", + run: func(t testing.TB) { + _, err := compile(t, `x +classes: { + mango: { + style.fill: orange + } +} +`) + assert.Success(t, err) + }, + }, + { + name: "nonroot", + run: func(t testing.TB) { + _, err := compile(t, `x: { + classes: { + mango: { + style.fill: orange + } + } +} +`) + assert.ErrorString(t, err, `TestCompile/classes/nonroot.d2:2:3: classes is only allowed at a board root`) + }, + }, + { + name: "merge", + run: func(t testing.TB) { + m, err := compile(t, `classes: { + mango: { + style.fill: orange + width: 10 + } +} +layers: { + hawaii: { + classes: { + mango: { + width: 9000 + } + } + } +} +`) + assert.Success(t, err) + assertQuery(t, m, 3, 0, nil, "layers.hawaii.classes.mango") + assertQuery(t, m, 0, 0, "orange", "layers.hawaii.classes.mango.style.fill") + assertQuery(t, m, 0, 0, 9000, "layers.hawaii.classes.mango.width") + }, + }, + { + name: "nested", + run: func(t testing.TB) { + m, err := compile(t, `classes: { + mango: { + style.fill: orange + } +} +layers: { + hawaii: { + layers: { + maui: { + x + } + } + } +} +`) + assert.Success(t, err) + assertQuery(t, m, 3, 0, nil, "layers.hawaii.classes") + assertQuery(t, m, 3, 0, nil, "layers.hawaii.layers.maui.classes") + }, + }, + { + name: "inherited", + run: func(t testing.TB) { + m, err := compile(t, `classes: { + mango: { + style.fill: orange + } +} +scenarios: { + hawaii: { + steps: { + 1: { + classes: { + cherry: { + style.fill: red + } + } + x + } + 2: { + y + } + 3: { + classes: { + cherry: { + style.fill: blue + } + } + y + } + 4: { + layers: { + deep: { + x + } + } + x + } + } + } +} +`) + assert.Success(t, err) + assertQuery(t, m, 3, 0, nil, "scenarios.hawaii.classes") + assertQuery(t, m, 2, 0, nil, "scenarios.hawaii.steps.2.classes.mango") + assertQuery(t, m, 2, 0, nil, "scenarios.hawaii.steps.2.classes.cherry") + assertQuery(t, m, 0, 0, "blue", "scenarios.hawaii.steps.4.classes.cherry.style.fill") + assertQuery(t, m, 0, 0, "blue", "scenarios.hawaii.steps.4.layers.deep.classes.cherry.style.fill") + }, + }, + { + name: "layer-modify", + run: func(t testing.TB) { + m, err := compile(t, `classes: { + orb: { + style.fill: yellow + } +} +layers: { + x: { + classes.orb.style.stroke: red + } +} +`) + assert.Success(t, err) + assertQuery(t, m, 0, 0, "yellow", "layers.x.classes.orb.style.fill") + assertQuery(t, m, 0, 0, "red", "layers.x.classes.orb.style.stroke") + }, + }, + } + runa(t, tca) +} diff --git a/d2ir/d2ir.go b/d2ir/d2ir.go index 6fc8c34ca..28acbb5da 100644 --- a/d2ir/d2ir.go +++ b/d2ir/d2ir.go @@ -601,6 +601,18 @@ func (m *Map) EdgeCountRecursive() int { return acc } +func (m *Map) GetClassMap(name string) *Map { + root := RootMap(m) + classes := root.Map().GetField("classes") + if classes != nil && classes.Map() != nil { + class := classes.Map().GetField(name) + if class != nil && class.Map() != nil { + return class.Map() + } + } + return nil +} + func (m *Map) GetField(ida ...string) *Field { for len(ida) > 0 && ida[0] == "_" { m = ParentMap(m) @@ -663,6 +675,10 @@ func (m *Map) ensureField(i int, kp *d2ast.KeyPath, refctx *RefContext) (*Field, return nil, d2parser.Errorf(kp.Path[i].Unbox(), `parent "_" can only be used in the beginning of paths, e.g. "_.x"`) } + if head == "classes" && NodeBoardKind(m) == "" { + return nil, d2parser.Errorf(kp.Path[i].Unbox(), "%s is only allowed at a board root", head) + } + if findBoardKeyword(head) != -1 && NodeBoardKind(m) == "" { return nil, d2parser.Errorf(kp.Path[i].Unbox(), "%s is only allowed at a board root", head) } @@ -935,6 +951,13 @@ func (m *Map) appendFieldReferences(i int, kp *d2ast.KeyPath, refctx *RefContext } } +func RootMap(m *Map) *Map { + if m.Root() { + return m + } + return RootMap(ParentMap(m)) +} + func ParentMap(n Node) *Map { for { n = n.Parent() diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index 2b2597d73..d46680b7a 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -515,7 +515,12 @@ func drawConnection(writer io.Writer, labelMaskID string, connection d2target.Co if connection.Opacity != 1.0 { opacityStyle = fmt.Sprintf(" style='opacity:%f'", connection.Opacity) } - fmt.Fprintf(writer, ``, svg.EscapeText(connection.ID), opacityStyle) + + classStr := "" + if len(connection.Classes) > 0 { + classStr = fmt.Sprintf(` class="%s"`, strings.Join(connection.Classes, " ")) + } + fmt.Fprintf(writer, ``, svg.EscapeText(connection.ID), opacityStyle, classStr) var markerStart string if connection.SrcArrow != d2target.NoArrowhead { id := arrowheadMarkerID(false, connection) @@ -919,7 +924,11 @@ func drawShape(writer io.Writer, diagramHash string, targetShape d2target.Shape, if targetShape.BorderRadius != 0 && (targetShape.Type == d2target.ShapeClass || targetShape.Type == d2target.ShapeSQLTable) { fmt.Fprint(writer, clipPathForBorderRadius(diagramHash, targetShape)) } - fmt.Fprintf(writer, ``, svg.EscapeText(targetShape.ID), opacityStyle) + classStr := "" + if len(targetShape.Classes) > 0 { + classStr = fmt.Sprintf(` class="%s"`, strings.Join(targetShape.Classes, " ")) + } + fmt.Fprintf(writer, ``, svg.EscapeText(targetShape.ID), opacityStyle, classStr) tl := geo.NewPoint(float64(targetShape.Pos.X), float64(targetShape.Pos.Y)) width := float64(targetShape.Width) height := float64(targetShape.Height) diff --git a/d2target/d2target.go b/d2target/d2target.go index 5729354e1..fd42e3407 100644 --- a/d2target/d2target.go +++ b/d2target/d2target.go @@ -305,6 +305,8 @@ type Shape struct { ID string `json:"id"` Type string `json:"type"` + Classes []string `json:"classes,omitempty"` + Pos Point `json:"pos"` Width int `json:"width"` Height int `json:"height"` @@ -425,6 +427,8 @@ func BaseShape() *Shape { type Connection struct { ID string `json:"id"` + Classes []string `json:"classes,omitempty"` + Src string `json:"src"` SrcArrow Arrowhead `json:"srcArrow"` SrcLabel string `json:"srcLabel"` diff --git a/e2etests/regression_test.go b/e2etests/regression_test.go index fd60724c5..def1627c1 100644 --- a/e2etests/regression_test.go +++ b/e2etests/regression_test.go @@ -271,9 +271,9 @@ m6_desc -> queue.M6 name: "unnamed_class_table_code", script: ` -class -> users -> code +class2 -> users -> code -class: "" { +class2: "" { shape: class -num: int -timeout: int @@ -318,7 +318,7 @@ ico: { name: "only_header_class_table", script: ` -class: RefreshAuthorizationPolicyProtocolServerSideTranslatorProtocolBuffer { +class2: RefreshAuthorizationPolicyProtocolServerSideTranslatorProtocolBuffer { shape: class } @@ -331,7 +331,7 @@ table with short col: RefreshAuthorizationPolicyCache { ok } -class -> table -> table with short col +class2 -> table -> table with short col `, }, { diff --git a/e2etests/stable_test.go b/e2etests/stable_test.go index 34f5f8b96..3fa198635 100644 --- a/e2etests/stable_test.go +++ b/e2etests/stable_test.go @@ -2000,9 +2000,9 @@ x -> y name: "unnamed_only_width", script: ` -class -> users -> code -> package -> no width +class2 -> users -> code -> package -> no width -class: "" { +class2: "" { shape: class -num: int -timeout: int @@ -2032,7 +2032,7 @@ package: "" { shape: package } no width: "" -class.width: 512 +class2.width: 512 users.width: 512 code.width: 512 package.width: 512 @@ -2042,9 +2042,9 @@ package.width: 512 name: "unnamed_only_height", script: ` -class -> users -> code -> package -> no height +class2 -> users -> code -> package -> no height -class: "" { +class2: "" { shape: class -num: int -timeout: int @@ -2074,7 +2074,7 @@ package: "" { shape: package } no height: "" -class.height: 512 +class2.height: 512 users.height: 512 code.height: 512 package.height: 512 @@ -2369,6 +2369,29 @@ y: { z: { near: center-left } +`, + }, + { + name: "classes", + script: `classes: { + dragon_ball: { + label: "" + shape: circle + style.fill: orange + style.stroke-width: 0 + width: 50 + } + path: { + label: "then" + style.stroke-width: 4 + } +} +nostar: { class: dragon_ball } +1star: { label: "*"; class: dragon_ball } +2star: { label: "**"; class: dragon_ball } + +nostar -> 1star: { class: path } +1star -> 2star: { class: path } `, }, { diff --git a/e2etests/testdata/regression/only_header_class_table/dagre/board.exp.json b/e2etests/testdata/regression/only_header_class_table/dagre/board.exp.json index 772d0cb1a..59e352347 100644 --- a/e2etests/testdata/regression/only_header_class_table/dagre/board.exp.json +++ b/e2etests/testdata/regression/only_header_class_table/dagre/board.exp.json @@ -4,7 +4,7 @@ "fontFamily": "SourceSansPro", "shapes": [ { - "id": "class", + "id": "class2", "type": "class", "pos": { "x": 0, @@ -164,8 +164,8 @@ ], "connections": [ { - "id": "(class -> table)[0]", - "src": "class", + "id": "(class2 -> table)[0]", + "src": "class2", "srcArrow": "none", "srcLabel": "", "dst": "table", diff --git a/e2etests/testdata/regression/only_header_class_table/dagre/sketch.exp.svg b/e2etests/testdata/regression/only_header_class_table/dagre/sketch.exp.svg index 55338adc8..2da0dce4a 100644 --- a/e2etests/testdata/regression/only_header_class_table/dagre/sketch.exp.svg +++ b/e2etests/testdata/regression/only_header_class_table/dagre/sketch.exp.svg @@ -1,16 +1,16 @@ -RefreshAuthorizationPolicyProtocolServerSideTranslatorProtocolBufferRefreshAuthorizationPolicyCacheRefreshAuthorizationPolicyCacheok + .d2-1676001659 .fill-N1{fill:#0A0F25;} + .d2-1676001659 .fill-N2{fill:#676C7E;} + .d2-1676001659 .fill-N3{fill:#9499AB;} + .d2-1676001659 .fill-N4{fill:#CFD2DD;} + .d2-1676001659 .fill-N5{fill:#DEE1EB;} + .d2-1676001659 .fill-N6{fill:#EEF1F8;} + .d2-1676001659 .fill-N7{fill:#FFFFFF;} + .d2-1676001659 .fill-B1{fill:#0D32B2;} + .d2-1676001659 .fill-B2{fill:#0D32B2;} + .d2-1676001659 .fill-B3{fill:#E3E9FD;} + .d2-1676001659 .fill-B4{fill:#E3E9FD;} + .d2-1676001659 .fill-B5{fill:#EDF0FD;} + .d2-1676001659 .fill-B6{fill:#F7F8FE;} + .d2-1676001659 .fill-AA2{fill:#4A6FF3;} + .d2-1676001659 .fill-AA4{fill:#EDF0FD;} + .d2-1676001659 .fill-AA5{fill:#F7F8FE;} + .d2-1676001659 .fill-AB4{fill:#EDF0FD;} + .d2-1676001659 .fill-AB5{fill:#F7F8FE;} + .d2-1676001659 .stroke-N1{stroke:#0A0F25;} + .d2-1676001659 .stroke-N2{stroke:#676C7E;} + .d2-1676001659 .stroke-N3{stroke:#9499AB;} + .d2-1676001659 .stroke-N4{stroke:#CFD2DD;} + .d2-1676001659 .stroke-N5{stroke:#DEE1EB;} + .d2-1676001659 .stroke-N6{stroke:#EEF1F8;} + .d2-1676001659 .stroke-N7{stroke:#FFFFFF;} + .d2-1676001659 .stroke-B1{stroke:#0D32B2;} + .d2-1676001659 .stroke-B2{stroke:#0D32B2;} + .d2-1676001659 .stroke-B3{stroke:#E3E9FD;} + .d2-1676001659 .stroke-B4{stroke:#E3E9FD;} + .d2-1676001659 .stroke-B5{stroke:#EDF0FD;} + .d2-1676001659 .stroke-B6{stroke:#F7F8FE;} + .d2-1676001659 .stroke-AA2{stroke:#4A6FF3;} + .d2-1676001659 .stroke-AA4{stroke:#EDF0FD;} + .d2-1676001659 .stroke-AA5{stroke:#F7F8FE;} + .d2-1676001659 .stroke-AB4{stroke:#EDF0FD;} + .d2-1676001659 .stroke-AB5{stroke:#F7F8FE;} + .d2-1676001659 .background-color-N1{background-color:#0A0F25;} + .d2-1676001659 .background-color-N2{background-color:#676C7E;} + .d2-1676001659 .background-color-N3{background-color:#9499AB;} + .d2-1676001659 .background-color-N4{background-color:#CFD2DD;} + .d2-1676001659 .background-color-N5{background-color:#DEE1EB;} + .d2-1676001659 .background-color-N6{background-color:#EEF1F8;} + .d2-1676001659 .background-color-N7{background-color:#FFFFFF;} + .d2-1676001659 .background-color-B1{background-color:#0D32B2;} + .d2-1676001659 .background-color-B2{background-color:#0D32B2;} + .d2-1676001659 .background-color-B3{background-color:#E3E9FD;} + .d2-1676001659 .background-color-B4{background-color:#E3E9FD;} + .d2-1676001659 .background-color-B5{background-color:#EDF0FD;} + .d2-1676001659 .background-color-B6{background-color:#F7F8FE;} + .d2-1676001659 .background-color-AA2{background-color:#4A6FF3;} + .d2-1676001659 .background-color-AA4{background-color:#EDF0FD;} + .d2-1676001659 .background-color-AA5{background-color:#F7F8FE;} + .d2-1676001659 .background-color-AB4{background-color:#EDF0FD;} + .d2-1676001659 .background-color-AB5{background-color:#F7F8FE;} + .d2-1676001659 .color-N1{color:#0A0F25;} + .d2-1676001659 .color-N2{color:#676C7E;} + .d2-1676001659 .color-N3{color:#9499AB;} + .d2-1676001659 .color-N4{color:#CFD2DD;} + .d2-1676001659 .color-N5{color:#DEE1EB;} + .d2-1676001659 .color-N6{color:#EEF1F8;} + .d2-1676001659 .color-N7{color:#FFFFFF;} + .d2-1676001659 .color-B1{color:#0D32B2;} + .d2-1676001659 .color-B2{color:#0D32B2;} + .d2-1676001659 .color-B3{color:#E3E9FD;} + .d2-1676001659 .color-B4{color:#E3E9FD;} + .d2-1676001659 .color-B5{color:#EDF0FD;} + .d2-1676001659 .color-B6{color:#F7F8FE;} + .d2-1676001659 .color-AA2{color:#4A6FF3;} + .d2-1676001659 .color-AA4{color:#EDF0FD;} + .d2-1676001659 .color-AA5{color:#F7F8FE;} + .d2-1676001659 .color-AB4{color:#EDF0FD;} + .d2-1676001659 .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}]]>RefreshAuthorizationPolicyProtocolServerSideTranslatorProtocolBufferRefreshAuthorizationPolicyCacheRefreshAuthorizationPolicyCacheok \ No newline at end of file diff --git a/e2etests/testdata/regression/only_header_class_table/elk/board.exp.json b/e2etests/testdata/regression/only_header_class_table/elk/board.exp.json index 97bcefe4e..63f96cae3 100644 --- a/e2etests/testdata/regression/only_header_class_table/elk/board.exp.json +++ b/e2etests/testdata/regression/only_header_class_table/elk/board.exp.json @@ -4,7 +4,7 @@ "fontFamily": "SourceSansPro", "shapes": [ { - "id": "class", + "id": "class2", "type": "class", "pos": { "x": 12, @@ -164,8 +164,8 @@ ], "connections": [ { - "id": "(class -> table)[0]", - "src": "class", + "id": "(class2 -> table)[0]", + "src": "class2", "srcArrow": "none", "srcLabel": "", "dst": "table", diff --git a/e2etests/testdata/regression/only_header_class_table/elk/sketch.exp.svg b/e2etests/testdata/regression/only_header_class_table/elk/sketch.exp.svg index f62ce001a..0228048bd 100644 --- a/e2etests/testdata/regression/only_header_class_table/elk/sketch.exp.svg +++ b/e2etests/testdata/regression/only_header_class_table/elk/sketch.exp.svg @@ -1,16 +1,16 @@ -RefreshAuthorizationPolicyProtocolServerSideTranslatorProtocolBufferRefreshAuthorizationPolicyCacheRefreshAuthorizationPolicyCacheok + .d2-2978833724 .fill-N1{fill:#0A0F25;} + .d2-2978833724 .fill-N2{fill:#676C7E;} + .d2-2978833724 .fill-N3{fill:#9499AB;} + .d2-2978833724 .fill-N4{fill:#CFD2DD;} + .d2-2978833724 .fill-N5{fill:#DEE1EB;} + .d2-2978833724 .fill-N6{fill:#EEF1F8;} + .d2-2978833724 .fill-N7{fill:#FFFFFF;} + .d2-2978833724 .fill-B1{fill:#0D32B2;} + .d2-2978833724 .fill-B2{fill:#0D32B2;} + .d2-2978833724 .fill-B3{fill:#E3E9FD;} + .d2-2978833724 .fill-B4{fill:#E3E9FD;} + .d2-2978833724 .fill-B5{fill:#EDF0FD;} + .d2-2978833724 .fill-B6{fill:#F7F8FE;} + .d2-2978833724 .fill-AA2{fill:#4A6FF3;} + .d2-2978833724 .fill-AA4{fill:#EDF0FD;} + .d2-2978833724 .fill-AA5{fill:#F7F8FE;} + .d2-2978833724 .fill-AB4{fill:#EDF0FD;} + .d2-2978833724 .fill-AB5{fill:#F7F8FE;} + .d2-2978833724 .stroke-N1{stroke:#0A0F25;} + .d2-2978833724 .stroke-N2{stroke:#676C7E;} + .d2-2978833724 .stroke-N3{stroke:#9499AB;} + .d2-2978833724 .stroke-N4{stroke:#CFD2DD;} + .d2-2978833724 .stroke-N5{stroke:#DEE1EB;} + .d2-2978833724 .stroke-N6{stroke:#EEF1F8;} + .d2-2978833724 .stroke-N7{stroke:#FFFFFF;} + .d2-2978833724 .stroke-B1{stroke:#0D32B2;} + .d2-2978833724 .stroke-B2{stroke:#0D32B2;} + .d2-2978833724 .stroke-B3{stroke:#E3E9FD;} + .d2-2978833724 .stroke-B4{stroke:#E3E9FD;} + .d2-2978833724 .stroke-B5{stroke:#EDF0FD;} + .d2-2978833724 .stroke-B6{stroke:#F7F8FE;} + .d2-2978833724 .stroke-AA2{stroke:#4A6FF3;} + .d2-2978833724 .stroke-AA4{stroke:#EDF0FD;} + .d2-2978833724 .stroke-AA5{stroke:#F7F8FE;} + .d2-2978833724 .stroke-AB4{stroke:#EDF0FD;} + .d2-2978833724 .stroke-AB5{stroke:#F7F8FE;} + .d2-2978833724 .background-color-N1{background-color:#0A0F25;} + .d2-2978833724 .background-color-N2{background-color:#676C7E;} + .d2-2978833724 .background-color-N3{background-color:#9499AB;} + .d2-2978833724 .background-color-N4{background-color:#CFD2DD;} + .d2-2978833724 .background-color-N5{background-color:#DEE1EB;} + .d2-2978833724 .background-color-N6{background-color:#EEF1F8;} + .d2-2978833724 .background-color-N7{background-color:#FFFFFF;} + .d2-2978833724 .background-color-B1{background-color:#0D32B2;} + .d2-2978833724 .background-color-B2{background-color:#0D32B2;} + .d2-2978833724 .background-color-B3{background-color:#E3E9FD;} + .d2-2978833724 .background-color-B4{background-color:#E3E9FD;} + .d2-2978833724 .background-color-B5{background-color:#EDF0FD;} + .d2-2978833724 .background-color-B6{background-color:#F7F8FE;} + .d2-2978833724 .background-color-AA2{background-color:#4A6FF3;} + .d2-2978833724 .background-color-AA4{background-color:#EDF0FD;} + .d2-2978833724 .background-color-AA5{background-color:#F7F8FE;} + .d2-2978833724 .background-color-AB4{background-color:#EDF0FD;} + .d2-2978833724 .background-color-AB5{background-color:#F7F8FE;} + .d2-2978833724 .color-N1{color:#0A0F25;} + .d2-2978833724 .color-N2{color:#676C7E;} + .d2-2978833724 .color-N3{color:#9499AB;} + .d2-2978833724 .color-N4{color:#CFD2DD;} + .d2-2978833724 .color-N5{color:#DEE1EB;} + .d2-2978833724 .color-N6{color:#EEF1F8;} + .d2-2978833724 .color-N7{color:#FFFFFF;} + .d2-2978833724 .color-B1{color:#0D32B2;} + .d2-2978833724 .color-B2{color:#0D32B2;} + .d2-2978833724 .color-B3{color:#E3E9FD;} + .d2-2978833724 .color-B4{color:#E3E9FD;} + .d2-2978833724 .color-B5{color:#EDF0FD;} + .d2-2978833724 .color-B6{color:#F7F8FE;} + .d2-2978833724 .color-AA2{color:#4A6FF3;} + .d2-2978833724 .color-AA4{color:#EDF0FD;} + .d2-2978833724 .color-AA5{color:#F7F8FE;} + .d2-2978833724 .color-AB4{color:#EDF0FD;} + .d2-2978833724 .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}]]>RefreshAuthorizationPolicyProtocolServerSideTranslatorProtocolBufferRefreshAuthorizationPolicyCacheRefreshAuthorizationPolicyCacheok \ No newline at end of file diff --git a/e2etests/testdata/regression/unnamed_class_table_code/dagre/board.exp.json b/e2etests/testdata/regression/unnamed_class_table_code/dagre/board.exp.json index 016e645a5..a775f28c1 100644 --- a/e2etests/testdata/regression/unnamed_class_table_code/dagre/board.exp.json +++ b/e2etests/testdata/regression/unnamed_class_table_code/dagre/board.exp.json @@ -4,7 +4,7 @@ "fontFamily": "SourceSansPro", "shapes": [ { - "id": "class", + "id": "class2", "type": "class", "pos": { "x": 0, @@ -305,8 +305,8 @@ ], "connections": [ { - "id": "(class -> users)[0]", - "src": "class", + "id": "(class2 -> users)[0]", + "src": "class2", "srcArrow": "none", "srcLabel": "", "dst": "users", diff --git a/e2etests/testdata/regression/unnamed_class_table_code/dagre/sketch.exp.svg b/e2etests/testdata/regression/unnamed_class_table_code/dagre/sketch.exp.svg index 8ca4633af..65e8e0ee8 100644 --- a/e2etests/testdata/regression/unnamed_class_table_code/dagre/sketch.exp.svg +++ b/e2etests/testdata/regression/unnamed_class_table_code/dagre/sketch.exp.svg @@ -1,23 +1,23 @@ --numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 + .d2-2260027450 .fill-N1{fill:#0A0F25;} + .d2-2260027450 .fill-N2{fill:#676C7E;} + .d2-2260027450 .fill-N3{fill:#9499AB;} + .d2-2260027450 .fill-N4{fill:#CFD2DD;} + .d2-2260027450 .fill-N5{fill:#DEE1EB;} + .d2-2260027450 .fill-N6{fill:#EEF1F8;} + .d2-2260027450 .fill-N7{fill:#FFFFFF;} + .d2-2260027450 .fill-B1{fill:#0D32B2;} + .d2-2260027450 .fill-B2{fill:#0D32B2;} + .d2-2260027450 .fill-B3{fill:#E3E9FD;} + .d2-2260027450 .fill-B4{fill:#E3E9FD;} + .d2-2260027450 .fill-B5{fill:#EDF0FD;} + .d2-2260027450 .fill-B6{fill:#F7F8FE;} + .d2-2260027450 .fill-AA2{fill:#4A6FF3;} + .d2-2260027450 .fill-AA4{fill:#EDF0FD;} + .d2-2260027450 .fill-AA5{fill:#F7F8FE;} + .d2-2260027450 .fill-AB4{fill:#EDF0FD;} + .d2-2260027450 .fill-AB5{fill:#F7F8FE;} + .d2-2260027450 .stroke-N1{stroke:#0A0F25;} + .d2-2260027450 .stroke-N2{stroke:#676C7E;} + .d2-2260027450 .stroke-N3{stroke:#9499AB;} + .d2-2260027450 .stroke-N4{stroke:#CFD2DD;} + .d2-2260027450 .stroke-N5{stroke:#DEE1EB;} + .d2-2260027450 .stroke-N6{stroke:#EEF1F8;} + .d2-2260027450 .stroke-N7{stroke:#FFFFFF;} + .d2-2260027450 .stroke-B1{stroke:#0D32B2;} + .d2-2260027450 .stroke-B2{stroke:#0D32B2;} + .d2-2260027450 .stroke-B3{stroke:#E3E9FD;} + .d2-2260027450 .stroke-B4{stroke:#E3E9FD;} + .d2-2260027450 .stroke-B5{stroke:#EDF0FD;} + .d2-2260027450 .stroke-B6{stroke:#F7F8FE;} + .d2-2260027450 .stroke-AA2{stroke:#4A6FF3;} + .d2-2260027450 .stroke-AA4{stroke:#EDF0FD;} + .d2-2260027450 .stroke-AA5{stroke:#F7F8FE;} + .d2-2260027450 .stroke-AB4{stroke:#EDF0FD;} + .d2-2260027450 .stroke-AB5{stroke:#F7F8FE;} + .d2-2260027450 .background-color-N1{background-color:#0A0F25;} + .d2-2260027450 .background-color-N2{background-color:#676C7E;} + .d2-2260027450 .background-color-N3{background-color:#9499AB;} + .d2-2260027450 .background-color-N4{background-color:#CFD2DD;} + .d2-2260027450 .background-color-N5{background-color:#DEE1EB;} + .d2-2260027450 .background-color-N6{background-color:#EEF1F8;} + .d2-2260027450 .background-color-N7{background-color:#FFFFFF;} + .d2-2260027450 .background-color-B1{background-color:#0D32B2;} + .d2-2260027450 .background-color-B2{background-color:#0D32B2;} + .d2-2260027450 .background-color-B3{background-color:#E3E9FD;} + .d2-2260027450 .background-color-B4{background-color:#E3E9FD;} + .d2-2260027450 .background-color-B5{background-color:#EDF0FD;} + .d2-2260027450 .background-color-B6{background-color:#F7F8FE;} + .d2-2260027450 .background-color-AA2{background-color:#4A6FF3;} + .d2-2260027450 .background-color-AA4{background-color:#EDF0FD;} + .d2-2260027450 .background-color-AA5{background-color:#F7F8FE;} + .d2-2260027450 .background-color-AB4{background-color:#EDF0FD;} + .d2-2260027450 .background-color-AB5{background-color:#F7F8FE;} + .d2-2260027450 .color-N1{color:#0A0F25;} + .d2-2260027450 .color-N2{color:#676C7E;} + .d2-2260027450 .color-N3{color:#9499AB;} + .d2-2260027450 .color-N4{color:#CFD2DD;} + .d2-2260027450 .color-N5{color:#DEE1EB;} + .d2-2260027450 .color-N6{color:#EEF1F8;} + .d2-2260027450 .color-N7{color:#FFFFFF;} + .d2-2260027450 .color-B1{color:#0D32B2;} + .d2-2260027450 .color-B2{color:#0D32B2;} + .d2-2260027450 .color-B3{color:#E3E9FD;} + .d2-2260027450 .color-B4{color:#E3E9FD;} + .d2-2260027450 .color-B5{color:#EDF0FD;} + .d2-2260027450 .color-B6{color:#F7F8FE;} + .d2-2260027450 .color-AA2{color:#4A6FF3;} + .d2-2260027450 .color-AA4{color:#EDF0FD;} + .d2-2260027450 .color-AA5{color:#F7F8FE;} + .d2-2260027450 .color-AB4{color:#EDF0FD;} + .d2-2260027450 .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}]]>-numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 := a + 7 fmt.Printf("%d", b)a := 5 b := a + 7 -fmt.Printf("%d", b) +fmt.Printf("%d", b) \ No newline at end of file diff --git a/e2etests/testdata/regression/unnamed_class_table_code/elk/board.exp.json b/e2etests/testdata/regression/unnamed_class_table_code/elk/board.exp.json index e80f1cd7a..d6f391d68 100644 --- a/e2etests/testdata/regression/unnamed_class_table_code/elk/board.exp.json +++ b/e2etests/testdata/regression/unnamed_class_table_code/elk/board.exp.json @@ -4,7 +4,7 @@ "fontFamily": "SourceSansPro", "shapes": [ { - "id": "class", + "id": "class2", "type": "class", "pos": { "x": 12, @@ -305,8 +305,8 @@ ], "connections": [ { - "id": "(class -> users)[0]", - "src": "class", + "id": "(class2 -> users)[0]", + "src": "class2", "srcArrow": "none", "srcLabel": "", "dst": "users", diff --git a/e2etests/testdata/regression/unnamed_class_table_code/elk/sketch.exp.svg b/e2etests/testdata/regression/unnamed_class_table_code/elk/sketch.exp.svg index b585cc4cb..cf1c9e2eb 100644 --- a/e2etests/testdata/regression/unnamed_class_table_code/elk/sketch.exp.svg +++ b/e2etests/testdata/regression/unnamed_class_table_code/elk/sketch.exp.svg @@ -1,23 +1,23 @@ --numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 + .d2-302577983 .fill-N1{fill:#0A0F25;} + .d2-302577983 .fill-N2{fill:#676C7E;} + .d2-302577983 .fill-N3{fill:#9499AB;} + .d2-302577983 .fill-N4{fill:#CFD2DD;} + .d2-302577983 .fill-N5{fill:#DEE1EB;} + .d2-302577983 .fill-N6{fill:#EEF1F8;} + .d2-302577983 .fill-N7{fill:#FFFFFF;} + .d2-302577983 .fill-B1{fill:#0D32B2;} + .d2-302577983 .fill-B2{fill:#0D32B2;} + .d2-302577983 .fill-B3{fill:#E3E9FD;} + .d2-302577983 .fill-B4{fill:#E3E9FD;} + .d2-302577983 .fill-B5{fill:#EDF0FD;} + .d2-302577983 .fill-B6{fill:#F7F8FE;} + .d2-302577983 .fill-AA2{fill:#4A6FF3;} + .d2-302577983 .fill-AA4{fill:#EDF0FD;} + .d2-302577983 .fill-AA5{fill:#F7F8FE;} + .d2-302577983 .fill-AB4{fill:#EDF0FD;} + .d2-302577983 .fill-AB5{fill:#F7F8FE;} + .d2-302577983 .stroke-N1{stroke:#0A0F25;} + .d2-302577983 .stroke-N2{stroke:#676C7E;} + .d2-302577983 .stroke-N3{stroke:#9499AB;} + .d2-302577983 .stroke-N4{stroke:#CFD2DD;} + .d2-302577983 .stroke-N5{stroke:#DEE1EB;} + .d2-302577983 .stroke-N6{stroke:#EEF1F8;} + .d2-302577983 .stroke-N7{stroke:#FFFFFF;} + .d2-302577983 .stroke-B1{stroke:#0D32B2;} + .d2-302577983 .stroke-B2{stroke:#0D32B2;} + .d2-302577983 .stroke-B3{stroke:#E3E9FD;} + .d2-302577983 .stroke-B4{stroke:#E3E9FD;} + .d2-302577983 .stroke-B5{stroke:#EDF0FD;} + .d2-302577983 .stroke-B6{stroke:#F7F8FE;} + .d2-302577983 .stroke-AA2{stroke:#4A6FF3;} + .d2-302577983 .stroke-AA4{stroke:#EDF0FD;} + .d2-302577983 .stroke-AA5{stroke:#F7F8FE;} + .d2-302577983 .stroke-AB4{stroke:#EDF0FD;} + .d2-302577983 .stroke-AB5{stroke:#F7F8FE;} + .d2-302577983 .background-color-N1{background-color:#0A0F25;} + .d2-302577983 .background-color-N2{background-color:#676C7E;} + .d2-302577983 .background-color-N3{background-color:#9499AB;} + .d2-302577983 .background-color-N4{background-color:#CFD2DD;} + .d2-302577983 .background-color-N5{background-color:#DEE1EB;} + .d2-302577983 .background-color-N6{background-color:#EEF1F8;} + .d2-302577983 .background-color-N7{background-color:#FFFFFF;} + .d2-302577983 .background-color-B1{background-color:#0D32B2;} + .d2-302577983 .background-color-B2{background-color:#0D32B2;} + .d2-302577983 .background-color-B3{background-color:#E3E9FD;} + .d2-302577983 .background-color-B4{background-color:#E3E9FD;} + .d2-302577983 .background-color-B5{background-color:#EDF0FD;} + .d2-302577983 .background-color-B6{background-color:#F7F8FE;} + .d2-302577983 .background-color-AA2{background-color:#4A6FF3;} + .d2-302577983 .background-color-AA4{background-color:#EDF0FD;} + .d2-302577983 .background-color-AA5{background-color:#F7F8FE;} + .d2-302577983 .background-color-AB4{background-color:#EDF0FD;} + .d2-302577983 .background-color-AB5{background-color:#F7F8FE;} + .d2-302577983 .color-N1{color:#0A0F25;} + .d2-302577983 .color-N2{color:#676C7E;} + .d2-302577983 .color-N3{color:#9499AB;} + .d2-302577983 .color-N4{color:#CFD2DD;} + .d2-302577983 .color-N5{color:#DEE1EB;} + .d2-302577983 .color-N6{color:#EEF1F8;} + .d2-302577983 .color-N7{color:#FFFFFF;} + .d2-302577983 .color-B1{color:#0D32B2;} + .d2-302577983 .color-B2{color:#0D32B2;} + .d2-302577983 .color-B3{color:#E3E9FD;} + .d2-302577983 .color-B4{color:#E3E9FD;} + .d2-302577983 .color-B5{color:#EDF0FD;} + .d2-302577983 .color-B6{color:#F7F8FE;} + .d2-302577983 .color-AA2{color:#4A6FF3;} + .d2-302577983 .color-AA4{color:#EDF0FD;} + .d2-302577983 .color-AA5{color:#F7F8FE;} + .d2-302577983 .color-AB4{color:#EDF0FD;} + .d2-302577983 .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}]]>-numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 := a + 7 fmt.Printf("%d", b)a := 5 b := a + 7 -fmt.Printf("%d", b) +fmt.Printf("%d", b) \ No newline at end of file diff --git a/e2etests/testdata/stable/classes/dagre/board.exp.json b/e2etests/testdata/stable/classes/dagre/board.exp.json new file mode 100644 index 000000000..5de10aa1a --- /dev/null +++ b/e2etests/testdata/stable/classes/dagre/board.exp.json @@ -0,0 +1,284 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "nostar", + "type": "oval", + "classes": [ + "dragon_ball" + ], + "pos": { + "x": 1, + "y": 0 + }, + "width": 50, + "height": 50, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "orange", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 1 + }, + { + "id": "1star", + "type": "oval", + "classes": [ + "dragon_ball" + ], + "pos": { + "x": 1, + "y": 171 + }, + "width": 50, + "height": 50, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "orange", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "*", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 7, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "2star", + "type": "oval", + "classes": [ + "dragon_ball" + ], + "pos": { + "x": 0, + "y": 342 + }, + "width": 52, + "height": 52, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "orange", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "**", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 15, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(nostar -> 1star)[0]", + "classes": [ + "path" + ], + "src": "nostar", + "srcArrow": "none", + "srcLabel": "", + "dst": "1star", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 4, + "stroke": "B1", + "borderRadius": 10, + "label": "then", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 30, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 26, + "y": 50 + }, + { + "x": 26, + "y": 98.4 + }, + { + "x": 26, + "y": 122.6 + }, + { + "x": 26, + "y": 171 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(1star -> 2star)[0]", + "classes": [ + "path" + ], + "src": "1star", + "srcArrow": "none", + "srcLabel": "", + "dst": "2star", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 4, + "stroke": "B1", + "borderRadius": 10, + "label": "then", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 30, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 26, + "y": 221 + }, + { + "x": 26, + "y": 269.4 + }, + { + "x": 26, + "y": 293.6 + }, + { + "x": 26, + "y": 342 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/stable/classes/dagre/sketch.exp.svg b/e2etests/testdata/stable/classes/dagre/sketch.exp.svg new file mode 100644 index 000000000..ecbce855e --- /dev/null +++ b/e2etests/testdata/stable/classes/dagre/sketch.exp.svg @@ -0,0 +1,103 @@ +*** thenthen + + + + \ No newline at end of file diff --git a/e2etests/testdata/stable/classes/elk/board.exp.json b/e2etests/testdata/stable/classes/elk/board.exp.json new file mode 100644 index 000000000..2dde2125e --- /dev/null +++ b/e2etests/testdata/stable/classes/elk/board.exp.json @@ -0,0 +1,266 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "nostar", + "type": "oval", + "classes": [ + "dragon_ball" + ], + "pos": { + "x": 13, + "y": 12 + }, + "width": 50, + "height": 50, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "orange", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 1 + }, + { + "id": "1star", + "type": "oval", + "classes": [ + "dragon_ball" + ], + "pos": { + "x": 13, + "y": 223 + }, + "width": 50, + "height": 50, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "orange", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "*", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 7, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "2star", + "type": "oval", + "classes": [ + "dragon_ball" + ], + "pos": { + "x": 12, + "y": 434 + }, + "width": 52, + "height": 52, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "orange", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "**", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 15, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(nostar -> 1star)[0]", + "classes": [ + "path" + ], + "src": "nostar", + "srcArrow": "none", + "srcLabel": "", + "dst": "1star", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 4, + "stroke": "B1", + "borderRadius": 10, + "label": "then", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 30, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 38, + "y": 62 + }, + { + "x": 38, + "y": 223 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(1star -> 2star)[0]", + "classes": [ + "path" + ], + "src": "1star", + "srcArrow": "none", + "srcLabel": "", + "dst": "2star", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 4, + "stroke": "B1", + "borderRadius": 10, + "label": "then", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 30, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 38, + "y": 273 + }, + { + "x": 38, + "y": 434 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/stable/classes/elk/sketch.exp.svg b/e2etests/testdata/stable/classes/elk/sketch.exp.svg new file mode 100644 index 000000000..8088c80d0 --- /dev/null +++ b/e2etests/testdata/stable/classes/elk/sketch.exp.svg @@ -0,0 +1,103 @@ +*** thenthen + + + + \ No newline at end of file diff --git a/e2etests/testdata/stable/unnamed_only_height/dagre/board.exp.json b/e2etests/testdata/stable/unnamed_only_height/dagre/board.exp.json index 1be4fed8a..9deabdd80 100644 --- a/e2etests/testdata/stable/unnamed_only_height/dagre/board.exp.json +++ b/e2etests/testdata/stable/unnamed_only_height/dagre/board.exp.json @@ -4,7 +4,7 @@ "fontFamily": "SourceSansPro", "shapes": [ { - "id": "class", + "id": "class2", "type": "class", "pos": { "x": 0, @@ -385,8 +385,8 @@ ], "connections": [ { - "id": "(class -> users)[0]", - "src": "class", + "id": "(class2 -> users)[0]", + "src": "class2", "srcArrow": "none", "srcLabel": "", "dst": "users", diff --git a/e2etests/testdata/stable/unnamed_only_height/dagre/sketch.exp.svg b/e2etests/testdata/stable/unnamed_only_height/dagre/sketch.exp.svg index d0a958540..5a91a2d4d 100644 --- a/e2etests/testdata/stable/unnamed_only_height/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/unnamed_only_height/dagre/sketch.exp.svg @@ -1,23 +1,23 @@ --numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 + .d2-1865452115 .fill-N1{fill:#0A0F25;} + .d2-1865452115 .fill-N2{fill:#676C7E;} + .d2-1865452115 .fill-N3{fill:#9499AB;} + .d2-1865452115 .fill-N4{fill:#CFD2DD;} + .d2-1865452115 .fill-N5{fill:#DEE1EB;} + .d2-1865452115 .fill-N6{fill:#EEF1F8;} + .d2-1865452115 .fill-N7{fill:#FFFFFF;} + .d2-1865452115 .fill-B1{fill:#0D32B2;} + .d2-1865452115 .fill-B2{fill:#0D32B2;} + .d2-1865452115 .fill-B3{fill:#E3E9FD;} + .d2-1865452115 .fill-B4{fill:#E3E9FD;} + .d2-1865452115 .fill-B5{fill:#EDF0FD;} + .d2-1865452115 .fill-B6{fill:#F7F8FE;} + .d2-1865452115 .fill-AA2{fill:#4A6FF3;} + .d2-1865452115 .fill-AA4{fill:#EDF0FD;} + .d2-1865452115 .fill-AA5{fill:#F7F8FE;} + .d2-1865452115 .fill-AB4{fill:#EDF0FD;} + .d2-1865452115 .fill-AB5{fill:#F7F8FE;} + .d2-1865452115 .stroke-N1{stroke:#0A0F25;} + .d2-1865452115 .stroke-N2{stroke:#676C7E;} + .d2-1865452115 .stroke-N3{stroke:#9499AB;} + .d2-1865452115 .stroke-N4{stroke:#CFD2DD;} + .d2-1865452115 .stroke-N5{stroke:#DEE1EB;} + .d2-1865452115 .stroke-N6{stroke:#EEF1F8;} + .d2-1865452115 .stroke-N7{stroke:#FFFFFF;} + .d2-1865452115 .stroke-B1{stroke:#0D32B2;} + .d2-1865452115 .stroke-B2{stroke:#0D32B2;} + .d2-1865452115 .stroke-B3{stroke:#E3E9FD;} + .d2-1865452115 .stroke-B4{stroke:#E3E9FD;} + .d2-1865452115 .stroke-B5{stroke:#EDF0FD;} + .d2-1865452115 .stroke-B6{stroke:#F7F8FE;} + .d2-1865452115 .stroke-AA2{stroke:#4A6FF3;} + .d2-1865452115 .stroke-AA4{stroke:#EDF0FD;} + .d2-1865452115 .stroke-AA5{stroke:#F7F8FE;} + .d2-1865452115 .stroke-AB4{stroke:#EDF0FD;} + .d2-1865452115 .stroke-AB5{stroke:#F7F8FE;} + .d2-1865452115 .background-color-N1{background-color:#0A0F25;} + .d2-1865452115 .background-color-N2{background-color:#676C7E;} + .d2-1865452115 .background-color-N3{background-color:#9499AB;} + .d2-1865452115 .background-color-N4{background-color:#CFD2DD;} + .d2-1865452115 .background-color-N5{background-color:#DEE1EB;} + .d2-1865452115 .background-color-N6{background-color:#EEF1F8;} + .d2-1865452115 .background-color-N7{background-color:#FFFFFF;} + .d2-1865452115 .background-color-B1{background-color:#0D32B2;} + .d2-1865452115 .background-color-B2{background-color:#0D32B2;} + .d2-1865452115 .background-color-B3{background-color:#E3E9FD;} + .d2-1865452115 .background-color-B4{background-color:#E3E9FD;} + .d2-1865452115 .background-color-B5{background-color:#EDF0FD;} + .d2-1865452115 .background-color-B6{background-color:#F7F8FE;} + .d2-1865452115 .background-color-AA2{background-color:#4A6FF3;} + .d2-1865452115 .background-color-AA4{background-color:#EDF0FD;} + .d2-1865452115 .background-color-AA5{background-color:#F7F8FE;} + .d2-1865452115 .background-color-AB4{background-color:#EDF0FD;} + .d2-1865452115 .background-color-AB5{background-color:#F7F8FE;} + .d2-1865452115 .color-N1{color:#0A0F25;} + .d2-1865452115 .color-N2{color:#676C7E;} + .d2-1865452115 .color-N3{color:#9499AB;} + .d2-1865452115 .color-N4{color:#CFD2DD;} + .d2-1865452115 .color-N5{color:#DEE1EB;} + .d2-1865452115 .color-N6{color:#EEF1F8;} + .d2-1865452115 .color-N7{color:#FFFFFF;} + .d2-1865452115 .color-B1{color:#0D32B2;} + .d2-1865452115 .color-B2{color:#0D32B2;} + .d2-1865452115 .color-B3{color:#E3E9FD;} + .d2-1865452115 .color-B4{color:#E3E9FD;} + .d2-1865452115 .color-B5{color:#EDF0FD;} + .d2-1865452115 .color-B6{color:#F7F8FE;} + .d2-1865452115 .color-AA2{color:#4A6FF3;} + .d2-1865452115 .color-AA4{color:#EDF0FD;} + .d2-1865452115 .color-AA5{color:#F7F8FE;} + .d2-1865452115 .color-AB4{color:#EDF0FD;} + .d2-1865452115 .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}]]>-numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 := a + 7 fmt.Printf("%d", b)a := 5 b := a + 7 -fmt.Printf("%d", b) +fmt.Printf("%d", b) \ No newline at end of file diff --git a/e2etests/testdata/stable/unnamed_only_height/elk/board.exp.json b/e2etests/testdata/stable/unnamed_only_height/elk/board.exp.json index f562eb5fb..5947ad5c2 100644 --- a/e2etests/testdata/stable/unnamed_only_height/elk/board.exp.json +++ b/e2etests/testdata/stable/unnamed_only_height/elk/board.exp.json @@ -4,7 +4,7 @@ "fontFamily": "SourceSansPro", "shapes": [ { - "id": "class", + "id": "class2", "type": "class", "pos": { "x": 12, @@ -385,8 +385,8 @@ ], "connections": [ { - "id": "(class -> users)[0]", - "src": "class", + "id": "(class2 -> users)[0]", + "src": "class2", "srcArrow": "none", "srcLabel": "", "dst": "users", diff --git a/e2etests/testdata/stable/unnamed_only_height/elk/sketch.exp.svg b/e2etests/testdata/stable/unnamed_only_height/elk/sketch.exp.svg index 1f5acbfd1..fb1242618 100644 --- a/e2etests/testdata/stable/unnamed_only_height/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/unnamed_only_height/elk/sketch.exp.svg @@ -1,23 +1,23 @@ --numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 + .d2-754102534 .fill-N1{fill:#0A0F25;} + .d2-754102534 .fill-N2{fill:#676C7E;} + .d2-754102534 .fill-N3{fill:#9499AB;} + .d2-754102534 .fill-N4{fill:#CFD2DD;} + .d2-754102534 .fill-N5{fill:#DEE1EB;} + .d2-754102534 .fill-N6{fill:#EEF1F8;} + .d2-754102534 .fill-N7{fill:#FFFFFF;} + .d2-754102534 .fill-B1{fill:#0D32B2;} + .d2-754102534 .fill-B2{fill:#0D32B2;} + .d2-754102534 .fill-B3{fill:#E3E9FD;} + .d2-754102534 .fill-B4{fill:#E3E9FD;} + .d2-754102534 .fill-B5{fill:#EDF0FD;} + .d2-754102534 .fill-B6{fill:#F7F8FE;} + .d2-754102534 .fill-AA2{fill:#4A6FF3;} + .d2-754102534 .fill-AA4{fill:#EDF0FD;} + .d2-754102534 .fill-AA5{fill:#F7F8FE;} + .d2-754102534 .fill-AB4{fill:#EDF0FD;} + .d2-754102534 .fill-AB5{fill:#F7F8FE;} + .d2-754102534 .stroke-N1{stroke:#0A0F25;} + .d2-754102534 .stroke-N2{stroke:#676C7E;} + .d2-754102534 .stroke-N3{stroke:#9499AB;} + .d2-754102534 .stroke-N4{stroke:#CFD2DD;} + .d2-754102534 .stroke-N5{stroke:#DEE1EB;} + .d2-754102534 .stroke-N6{stroke:#EEF1F8;} + .d2-754102534 .stroke-N7{stroke:#FFFFFF;} + .d2-754102534 .stroke-B1{stroke:#0D32B2;} + .d2-754102534 .stroke-B2{stroke:#0D32B2;} + .d2-754102534 .stroke-B3{stroke:#E3E9FD;} + .d2-754102534 .stroke-B4{stroke:#E3E9FD;} + .d2-754102534 .stroke-B5{stroke:#EDF0FD;} + .d2-754102534 .stroke-B6{stroke:#F7F8FE;} + .d2-754102534 .stroke-AA2{stroke:#4A6FF3;} + .d2-754102534 .stroke-AA4{stroke:#EDF0FD;} + .d2-754102534 .stroke-AA5{stroke:#F7F8FE;} + .d2-754102534 .stroke-AB4{stroke:#EDF0FD;} + .d2-754102534 .stroke-AB5{stroke:#F7F8FE;} + .d2-754102534 .background-color-N1{background-color:#0A0F25;} + .d2-754102534 .background-color-N2{background-color:#676C7E;} + .d2-754102534 .background-color-N3{background-color:#9499AB;} + .d2-754102534 .background-color-N4{background-color:#CFD2DD;} + .d2-754102534 .background-color-N5{background-color:#DEE1EB;} + .d2-754102534 .background-color-N6{background-color:#EEF1F8;} + .d2-754102534 .background-color-N7{background-color:#FFFFFF;} + .d2-754102534 .background-color-B1{background-color:#0D32B2;} + .d2-754102534 .background-color-B2{background-color:#0D32B2;} + .d2-754102534 .background-color-B3{background-color:#E3E9FD;} + .d2-754102534 .background-color-B4{background-color:#E3E9FD;} + .d2-754102534 .background-color-B5{background-color:#EDF0FD;} + .d2-754102534 .background-color-B6{background-color:#F7F8FE;} + .d2-754102534 .background-color-AA2{background-color:#4A6FF3;} + .d2-754102534 .background-color-AA4{background-color:#EDF0FD;} + .d2-754102534 .background-color-AA5{background-color:#F7F8FE;} + .d2-754102534 .background-color-AB4{background-color:#EDF0FD;} + .d2-754102534 .background-color-AB5{background-color:#F7F8FE;} + .d2-754102534 .color-N1{color:#0A0F25;} + .d2-754102534 .color-N2{color:#676C7E;} + .d2-754102534 .color-N3{color:#9499AB;} + .d2-754102534 .color-N4{color:#CFD2DD;} + .d2-754102534 .color-N5{color:#DEE1EB;} + .d2-754102534 .color-N6{color:#EEF1F8;} + .d2-754102534 .color-N7{color:#FFFFFF;} + .d2-754102534 .color-B1{color:#0D32B2;} + .d2-754102534 .color-B2{color:#0D32B2;} + .d2-754102534 .color-B3{color:#E3E9FD;} + .d2-754102534 .color-B4{color:#E3E9FD;} + .d2-754102534 .color-B5{color:#EDF0FD;} + .d2-754102534 .color-B6{color:#F7F8FE;} + .d2-754102534 .color-AA2{color:#4A6FF3;} + .d2-754102534 .color-AA4{color:#EDF0FD;} + .d2-754102534 .color-AA5{color:#F7F8FE;} + .d2-754102534 .color-AB4{color:#EDF0FD;} + .d2-754102534 .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}]]>-numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 := a + 7 fmt.Printf("%d", b)a := 5 b := a + 7 -fmt.Printf("%d", b) +fmt.Printf("%d", b) \ No newline at end of file diff --git a/e2etests/testdata/stable/unnamed_only_width/dagre/board.exp.json b/e2etests/testdata/stable/unnamed_only_width/dagre/board.exp.json index 34ed25cb4..981058d39 100644 --- a/e2etests/testdata/stable/unnamed_only_width/dagre/board.exp.json +++ b/e2etests/testdata/stable/unnamed_only_width/dagre/board.exp.json @@ -4,7 +4,7 @@ "fontFamily": "SourceSansPro", "shapes": [ { - "id": "class", + "id": "class2", "type": "class", "pos": { "x": 0, @@ -385,8 +385,8 @@ ], "connections": [ { - "id": "(class -> users)[0]", - "src": "class", + "id": "(class2 -> users)[0]", + "src": "class2", "srcArrow": "none", "srcLabel": "", "dst": "users", diff --git a/e2etests/testdata/stable/unnamed_only_width/dagre/sketch.exp.svg b/e2etests/testdata/stable/unnamed_only_width/dagre/sketch.exp.svg index b759ddfa2..5532131d2 100644 --- a/e2etests/testdata/stable/unnamed_only_width/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/unnamed_only_width/dagre/sketch.exp.svg @@ -1,23 +1,23 @@ --numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 + .d2-995104800 .fill-N1{fill:#0A0F25;} + .d2-995104800 .fill-N2{fill:#676C7E;} + .d2-995104800 .fill-N3{fill:#9499AB;} + .d2-995104800 .fill-N4{fill:#CFD2DD;} + .d2-995104800 .fill-N5{fill:#DEE1EB;} + .d2-995104800 .fill-N6{fill:#EEF1F8;} + .d2-995104800 .fill-N7{fill:#FFFFFF;} + .d2-995104800 .fill-B1{fill:#0D32B2;} + .d2-995104800 .fill-B2{fill:#0D32B2;} + .d2-995104800 .fill-B3{fill:#E3E9FD;} + .d2-995104800 .fill-B4{fill:#E3E9FD;} + .d2-995104800 .fill-B5{fill:#EDF0FD;} + .d2-995104800 .fill-B6{fill:#F7F8FE;} + .d2-995104800 .fill-AA2{fill:#4A6FF3;} + .d2-995104800 .fill-AA4{fill:#EDF0FD;} + .d2-995104800 .fill-AA5{fill:#F7F8FE;} + .d2-995104800 .fill-AB4{fill:#EDF0FD;} + .d2-995104800 .fill-AB5{fill:#F7F8FE;} + .d2-995104800 .stroke-N1{stroke:#0A0F25;} + .d2-995104800 .stroke-N2{stroke:#676C7E;} + .d2-995104800 .stroke-N3{stroke:#9499AB;} + .d2-995104800 .stroke-N4{stroke:#CFD2DD;} + .d2-995104800 .stroke-N5{stroke:#DEE1EB;} + .d2-995104800 .stroke-N6{stroke:#EEF1F8;} + .d2-995104800 .stroke-N7{stroke:#FFFFFF;} + .d2-995104800 .stroke-B1{stroke:#0D32B2;} + .d2-995104800 .stroke-B2{stroke:#0D32B2;} + .d2-995104800 .stroke-B3{stroke:#E3E9FD;} + .d2-995104800 .stroke-B4{stroke:#E3E9FD;} + .d2-995104800 .stroke-B5{stroke:#EDF0FD;} + .d2-995104800 .stroke-B6{stroke:#F7F8FE;} + .d2-995104800 .stroke-AA2{stroke:#4A6FF3;} + .d2-995104800 .stroke-AA4{stroke:#EDF0FD;} + .d2-995104800 .stroke-AA5{stroke:#F7F8FE;} + .d2-995104800 .stroke-AB4{stroke:#EDF0FD;} + .d2-995104800 .stroke-AB5{stroke:#F7F8FE;} + .d2-995104800 .background-color-N1{background-color:#0A0F25;} + .d2-995104800 .background-color-N2{background-color:#676C7E;} + .d2-995104800 .background-color-N3{background-color:#9499AB;} + .d2-995104800 .background-color-N4{background-color:#CFD2DD;} + .d2-995104800 .background-color-N5{background-color:#DEE1EB;} + .d2-995104800 .background-color-N6{background-color:#EEF1F8;} + .d2-995104800 .background-color-N7{background-color:#FFFFFF;} + .d2-995104800 .background-color-B1{background-color:#0D32B2;} + .d2-995104800 .background-color-B2{background-color:#0D32B2;} + .d2-995104800 .background-color-B3{background-color:#E3E9FD;} + .d2-995104800 .background-color-B4{background-color:#E3E9FD;} + .d2-995104800 .background-color-B5{background-color:#EDF0FD;} + .d2-995104800 .background-color-B6{background-color:#F7F8FE;} + .d2-995104800 .background-color-AA2{background-color:#4A6FF3;} + .d2-995104800 .background-color-AA4{background-color:#EDF0FD;} + .d2-995104800 .background-color-AA5{background-color:#F7F8FE;} + .d2-995104800 .background-color-AB4{background-color:#EDF0FD;} + .d2-995104800 .background-color-AB5{background-color:#F7F8FE;} + .d2-995104800 .color-N1{color:#0A0F25;} + .d2-995104800 .color-N2{color:#676C7E;} + .d2-995104800 .color-N3{color:#9499AB;} + .d2-995104800 .color-N4{color:#CFD2DD;} + .d2-995104800 .color-N5{color:#DEE1EB;} + .d2-995104800 .color-N6{color:#EEF1F8;} + .d2-995104800 .color-N7{color:#FFFFFF;} + .d2-995104800 .color-B1{color:#0D32B2;} + .d2-995104800 .color-B2{color:#0D32B2;} + .d2-995104800 .color-B3{color:#E3E9FD;} + .d2-995104800 .color-B4{color:#E3E9FD;} + .d2-995104800 .color-B5{color:#EDF0FD;} + .d2-995104800 .color-B6{color:#F7F8FE;} + .d2-995104800 .color-AA2{color:#4A6FF3;} + .d2-995104800 .color-AA4{color:#EDF0FD;} + .d2-995104800 .color-AA5{color:#F7F8FE;} + .d2-995104800 .color-AB4{color:#EDF0FD;} + .d2-995104800 .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}]]>-numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 := a + 7 fmt.Printf("%d", b)a := 5 b := a + 7 -fmt.Printf("%d", b) +fmt.Printf("%d", b) \ No newline at end of file diff --git a/e2etests/testdata/stable/unnamed_only_width/elk/board.exp.json b/e2etests/testdata/stable/unnamed_only_width/elk/board.exp.json index c18b28486..fa82ab65a 100644 --- a/e2etests/testdata/stable/unnamed_only_width/elk/board.exp.json +++ b/e2etests/testdata/stable/unnamed_only_width/elk/board.exp.json @@ -4,7 +4,7 @@ "fontFamily": "SourceSansPro", "shapes": [ { - "id": "class", + "id": "class2", "type": "class", "pos": { "x": 12, @@ -385,8 +385,8 @@ ], "connections": [ { - "id": "(class -> users)[0]", - "src": "class", + "id": "(class2 -> users)[0]", + "src": "class2", "srcArrow": "none", "srcLabel": "", "dst": "users", diff --git a/e2etests/testdata/stable/unnamed_only_width/elk/sketch.exp.svg b/e2etests/testdata/stable/unnamed_only_width/elk/sketch.exp.svg index e093f564e..b8061c2ca 100644 --- a/e2etests/testdata/stable/unnamed_only_width/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/unnamed_only_width/elk/sketch.exp.svg @@ -1,23 +1,23 @@ --numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 + .d2-3755768396 .fill-N1{fill:#0A0F25;} + .d2-3755768396 .fill-N2{fill:#676C7E;} + .d2-3755768396 .fill-N3{fill:#9499AB;} + .d2-3755768396 .fill-N4{fill:#CFD2DD;} + .d2-3755768396 .fill-N5{fill:#DEE1EB;} + .d2-3755768396 .fill-N6{fill:#EEF1F8;} + .d2-3755768396 .fill-N7{fill:#FFFFFF;} + .d2-3755768396 .fill-B1{fill:#0D32B2;} + .d2-3755768396 .fill-B2{fill:#0D32B2;} + .d2-3755768396 .fill-B3{fill:#E3E9FD;} + .d2-3755768396 .fill-B4{fill:#E3E9FD;} + .d2-3755768396 .fill-B5{fill:#EDF0FD;} + .d2-3755768396 .fill-B6{fill:#F7F8FE;} + .d2-3755768396 .fill-AA2{fill:#4A6FF3;} + .d2-3755768396 .fill-AA4{fill:#EDF0FD;} + .d2-3755768396 .fill-AA5{fill:#F7F8FE;} + .d2-3755768396 .fill-AB4{fill:#EDF0FD;} + .d2-3755768396 .fill-AB5{fill:#F7F8FE;} + .d2-3755768396 .stroke-N1{stroke:#0A0F25;} + .d2-3755768396 .stroke-N2{stroke:#676C7E;} + .d2-3755768396 .stroke-N3{stroke:#9499AB;} + .d2-3755768396 .stroke-N4{stroke:#CFD2DD;} + .d2-3755768396 .stroke-N5{stroke:#DEE1EB;} + .d2-3755768396 .stroke-N6{stroke:#EEF1F8;} + .d2-3755768396 .stroke-N7{stroke:#FFFFFF;} + .d2-3755768396 .stroke-B1{stroke:#0D32B2;} + .d2-3755768396 .stroke-B2{stroke:#0D32B2;} + .d2-3755768396 .stroke-B3{stroke:#E3E9FD;} + .d2-3755768396 .stroke-B4{stroke:#E3E9FD;} + .d2-3755768396 .stroke-B5{stroke:#EDF0FD;} + .d2-3755768396 .stroke-B6{stroke:#F7F8FE;} + .d2-3755768396 .stroke-AA2{stroke:#4A6FF3;} + .d2-3755768396 .stroke-AA4{stroke:#EDF0FD;} + .d2-3755768396 .stroke-AA5{stroke:#F7F8FE;} + .d2-3755768396 .stroke-AB4{stroke:#EDF0FD;} + .d2-3755768396 .stroke-AB5{stroke:#F7F8FE;} + .d2-3755768396 .background-color-N1{background-color:#0A0F25;} + .d2-3755768396 .background-color-N2{background-color:#676C7E;} + .d2-3755768396 .background-color-N3{background-color:#9499AB;} + .d2-3755768396 .background-color-N4{background-color:#CFD2DD;} + .d2-3755768396 .background-color-N5{background-color:#DEE1EB;} + .d2-3755768396 .background-color-N6{background-color:#EEF1F8;} + .d2-3755768396 .background-color-N7{background-color:#FFFFFF;} + .d2-3755768396 .background-color-B1{background-color:#0D32B2;} + .d2-3755768396 .background-color-B2{background-color:#0D32B2;} + .d2-3755768396 .background-color-B3{background-color:#E3E9FD;} + .d2-3755768396 .background-color-B4{background-color:#E3E9FD;} + .d2-3755768396 .background-color-B5{background-color:#EDF0FD;} + .d2-3755768396 .background-color-B6{background-color:#F7F8FE;} + .d2-3755768396 .background-color-AA2{background-color:#4A6FF3;} + .d2-3755768396 .background-color-AA4{background-color:#EDF0FD;} + .d2-3755768396 .background-color-AA5{background-color:#F7F8FE;} + .d2-3755768396 .background-color-AB4{background-color:#EDF0FD;} + .d2-3755768396 .background-color-AB5{background-color:#F7F8FE;} + .d2-3755768396 .color-N1{color:#0A0F25;} + .d2-3755768396 .color-N2{color:#676C7E;} + .d2-3755768396 .color-N3{color:#9499AB;} + .d2-3755768396 .color-N4{color:#CFD2DD;} + .d2-3755768396 .color-N5{color:#DEE1EB;} + .d2-3755768396 .color-N6{color:#EEF1F8;} + .d2-3755768396 .color-N7{color:#FFFFFF;} + .d2-3755768396 .color-B1{color:#0D32B2;} + .d2-3755768396 .color-B2{color:#0D32B2;} + .d2-3755768396 .color-B3{color:#E3E9FD;} + .d2-3755768396 .color-B4{color:#E3E9FD;} + .d2-3755768396 .color-B5{color:#EDF0FD;} + .d2-3755768396 .color-B6{color:#F7F8FE;} + .d2-3755768396 .color-AA2{color:#4A6FF3;} + .d2-3755768396 .color-AA4{color:#EDF0FD;} + .d2-3755768396 .color-AA5{color:#F7F8FE;} + .d2-3755768396 .color-AB4{color:#EDF0FD;} + .d2-3755768396 .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}]]>-numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voididintnamestringemailstringpasswordstringlast_logindatetime:= 5 := a + 7 fmt.Printf("%d", b)a := 5 b := a + 7 -fmt.Printf("%d", b) +fmt.Printf("%d", b) \ No newline at end of file diff --git a/e2etests/testdata/todo/shape_set_width_height/dagre/board.exp.json b/e2etests/testdata/todo/shape_set_width_height/dagre/board.exp.json index 788f25b34..a621c64a7 100644 --- a/e2etests/testdata/todo/shape_set_width_height/dagre/board.exp.json +++ b/e2etests/testdata/todo/shape_set_width_height/dagre/board.exp.json @@ -455,7 +455,7 @@ "level": 1 }, { - "id": "class", + "id": "class2", "type": "class", "pos": { "x": 828, @@ -513,7 +513,7 @@ } ], "columns": null, - "label": "class", + "label": "class2", "fontSize": 20, "fontFamily": "DEFAULT", "language": "", @@ -521,7 +521,7 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 70, + "labelWidth": 85, "labelHeight": 31, "zIndex": 0, "level": 1, @@ -877,11 +877,11 @@ ], "connections": [ { - "id": "(cloud -> class)[0]", + "id": "(cloud -> class2)[0]", "src": "cloud", "srcArrow": "none", "srcLabel": "", - "dst": "class", + "dst": "class2", "dstArrow": "triangle", "dstLabel": "", "opacity": 1, @@ -938,8 +938,8 @@ "zIndex": 0 }, { - "id": "(class -> tall cylinder)[0]", - "src": "class", + "id": "(class2 -> tall cylinder)[0]", + "src": "class2", "srcArrow": "none", "srcLabel": "", "dst": "tall cylinder", diff --git a/e2etests/testdata/todo/shape_set_width_height/dagre/sketch.exp.svg b/e2etests/testdata/todo/shape_set_width_height/dagre/sketch.exp.svg index 479bdea2b..7db00b71a 100644 --- a/e2etests/testdata/todo/shape_set_width_height/dagre/sketch.exp.svg +++ b/e2etests/testdata/todo/shape_set_width_height/dagre/sketch.exp.svg @@ -1,31 +1,31 @@ -containerscloudtall cylinderclass-numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voidusersidintnamestringemailstringpasswordstringlast_logindatetimecontainer

markdown text expanded to 800x400

+containerscloudtall cylinderclass2-numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voidusersidintnamestringemailstringpasswordstringlast_logindatetimecontainer

markdown text expanded to 800x400

:= 5 := a + 7 fmt.Printf("%d", b)a := 5 @@ -861,7 +861,7 @@ := a + 7 fmt.Printf("%d", b)a := 5 b := a + 7 -fmt.Printf("%d", b)circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval +fmt.Printf("%d", b)circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval \ No newline at end of file diff --git a/e2etests/testdata/todo/shape_set_width_height/elk/board.exp.json b/e2etests/testdata/todo/shape_set_width_height/elk/board.exp.json index 3099bad23..0d3b5740e 100644 --- a/e2etests/testdata/todo/shape_set_width_height/elk/board.exp.json +++ b/e2etests/testdata/todo/shape_set_width_height/elk/board.exp.json @@ -455,7 +455,7 @@ "level": 1 }, { - "id": "class", + "id": "class2", "type": "class", "pos": { "x": 1276, @@ -513,7 +513,7 @@ } ], "columns": null, - "label": "class", + "label": "class2", "fontSize": 20, "fontFamily": "DEFAULT", "language": "", @@ -521,7 +521,7 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 70, + "labelWidth": 85, "labelHeight": 31, "zIndex": 0, "level": 1, @@ -877,11 +877,11 @@ ], "connections": [ { - "id": "(cloud -> class)[0]", + "id": "(cloud -> class2)[0]", "src": "cloud", "srcArrow": "none", "srcLabel": "", - "dst": "class", + "dst": "class2", "dstArrow": "triangle", "dstLabel": "", "opacity": 1, @@ -917,8 +917,8 @@ "zIndex": 0 }, { - "id": "(class -> tall cylinder)[0]", - "src": "class", + "id": "(class2 -> tall cylinder)[0]", + "src": "class2", "srcArrow": "none", "srcLabel": "", "dst": "tall cylinder", diff --git a/e2etests/testdata/todo/shape_set_width_height/elk/sketch.exp.svg b/e2etests/testdata/todo/shape_set_width_height/elk/sketch.exp.svg index c7772c634..68783334e 100644 --- a/e2etests/testdata/todo/shape_set_width_height/elk/sketch.exp.svg +++ b/e2etests/testdata/todo/shape_set_width_height/elk/sketch.exp.svg @@ -1,31 +1,31 @@ -containerscloudtall cylinderclass-numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voidusersidintnamestringemailstringpasswordstringlast_logindatetimecontainer

markdown text expanded to 800x400

+containerscloudtall cylinderclass2-numint-timeoutint-pid+getStatus()Enum+getJobs()Job[]+setTimeout(seconds int)voidusersidintnamestringemailstringpasswordstringlast_logindatetimecontainer

markdown text expanded to 800x400

:= 5 := a + 7 fmt.Printf("%d", b)a := 5 @@ -861,7 +861,7 @@ := a + 7 fmt.Printf("%d", b)a := 5 b := a + 7 -fmt.Printf("%d", b)circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval +fmt.Printf("%d", b)circle containerdiamond containeroval containerhexagon containerdiamondcirclehexagonoval \ No newline at end of file diff --git a/e2etests/todo_test.go b/e2etests/todo_test.go index 232db0b66..5568363af 100644 --- a/e2etests/todo_test.go +++ b/e2etests/todo_test.go @@ -107,7 +107,7 @@ tall cylinder: { width: 256 height: 512 } -cloud -> class -> tall cylinder -> users +cloud -> class2 -> tall cylinder -> users users: { shape: sql_table @@ -121,7 +121,7 @@ users: { height: 400 } -class: { +class2: { shape: class -num: int -timeout: int diff --git a/testdata/d2compiler/TestCompile/classes-internal-edge.exp.json b/testdata/d2compiler/TestCompile/classes-internal-edge.exp.json new file mode 100644 index 000000000..c3a2adf37 --- /dev/null +++ b/testdata/d2compiler/TestCompile/classes-internal-edge.exp.json @@ -0,0 +1,12 @@ +{ + "graph": null, + "err": { + "ioerr": null, + "errs": [ + { + "range": "d2/testdata/d2compiler/TestCompile/classes-internal-edge.d2,7:2:72-7:16:86", + "errmsg": "d2/testdata/d2compiler/TestCompile/classes-internal-edge.d2:8:3: classes cannot contain an edge" + } + ] + } +} diff --git a/testdata/d2compiler/TestCompile/classes-unreserved.exp.json b/testdata/d2compiler/TestCompile/classes-unreserved.exp.json new file mode 100644 index 000000000..b33e928eb --- /dev/null +++ b/testdata/d2compiler/TestCompile/classes-unreserved.exp.json @@ -0,0 +1,12 @@ +{ + "graph": null, + "err": { + "ioerr": null, + "errs": [ + { + "range": "d2/testdata/d2compiler/TestCompile/classes-unreserved.d2,2:4:26-2:8:30", + "errmsg": "d2/testdata/d2compiler/TestCompile/classes-unreserved.d2:3:5: seed is an invalid class field, must be reserved keyword" + } + ] + } +} diff --git a/testdata/d2compiler/TestCompile/classes.exp.json b/testdata/d2compiler/TestCompile/classes.exp.json new file mode 100644 index 000000000..df9ed3f5a --- /dev/null +++ b/testdata/d2compiler/TestCompile/classes.exp.json @@ -0,0 +1,907 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,0:0:0-16:0:306", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,0:0:0-10:1:146", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,0:9:9-10:0:145", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,1:2:13-5:3:86", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,1:2:13-1:13:24", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,1:2:13-1:13:24", + "value": [ + { + "string": "dragon_ball", + "raw_string": "dragon_ball" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,1:15:26-5:2:85", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,2:4:32-2:13:41", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,2:4:32-2:9:37", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,2:4:32-2:9:37", + "value": [ + { + "string": "label", + "raw_string": "label" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "double_quoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,2:11:39-2:13:41", + "value": null + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,3:4:46-3:17:59", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,3:4:46-3:9:51", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,3:4:46-3:9:51", + "value": [ + { + "string": "shape", + "raw_string": "shape" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,3:11:53-3:17:59", + "value": [ + { + "string": "circle", + "raw_string": "circle" + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,4:4:64-4:22:82", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,4:4:64-4:14:74", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,4:4:64-4:9:69", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,4:10:70-4:14:74", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,4:16:76-4:22:82", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,6:2:89-9:3:144", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,6:2:89-6:6:93", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,6:2:89-6:6:93", + "value": [ + { + "string": "path", + "raw_string": "path" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,6:8:95-9:2:143", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,7:4:101-7:17:114", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,7:4:101-7:9:106", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,7:4:101-7:9:106", + "value": [ + { + "string": "label", + "raw_string": "label" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "double_quoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,7:11:108-7:17:114", + "value": [ + { + "string": "then", + "raw_string": "then" + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,8:4:119-8:25:140", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,8:4:119-8:22:137", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,8:4:119-8:9:124", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,8:10:125-8:22:137", + "value": [ + { + "string": "stroke-width", + "raw_string": "stroke-width" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,8:24:139-8:25:140", + "raw": "4", + "value": "4" + } + } + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,11:0:147-11:30:177", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,11:0:147-11:6:153", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,11:0:147-11:6:153", + "value": [ + { + "string": "nostar", + "raw_string": "nostar" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,11:8:155-11:29:176", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,11:10:157-11:29:176", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,11:10:157-11:15:162", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,11:10:157-11:15:162", + "value": [ + { + "string": "class", + "raw_string": "class" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,11:17:164-11:28:175", + "value": [ + { + "string": "dragon_ball", + "raw_string": "dragon_ball" + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,12:0:178-12:50:228", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,12:0:178-12:5:183", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,12:0:178-12:5:183", + "value": [ + { + "string": "1star", + "raw_string": "1star" + } + ] + } + } + ] + }, + "primary": { + "double_quoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,12:7:185-12:10:188", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ] + } + }, + "value": { + "map": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,12:11:189-12:49:227", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,12:13:191-12:31:209", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,12:13:191-12:18:196", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,12:13:191-12:18:196", + "value": [ + { + "string": "class", + "raw_string": "class" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,12:20:198-12:31:209", + "value": [ + { + "string": "dragon_ball", + "raw_string": "dragon_ball" + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,12:33:211-12:49:227", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,12:33:211-12:43:221", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,12:33:211-12:38:216", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,12:39:217-12:43:221", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,12:45:223-12:48:226", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,13:0:229-13:42:271", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,13:0:229-13:5:234", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,13:0:229-13:5:234", + "value": [ + { + "string": "2star", + "raw_string": "2star" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,13:7:236-13:41:270", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,13:9:238-13:20:249", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,13:9:238-13:14:243", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,13:9:238-13:14:243", + "value": [ + { + "string": "label", + "raw_string": "label" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "double_quoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,13:16:245-13:20:249", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,13:22:251-13:41:270", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,13:22:251-13:27:256", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,13:22:251-13:27:256", + "value": [ + { + "string": "class", + "raw_string": "class" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,13:29:258-13:40:269", + "value": [ + { + "string": "dragon_ball", + "raw_string": "dragon_ball" + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,15:0:273-15:32:305", + "edges": [ + { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,15:0:273-15:15:288", + "src": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,15:0:273-15:7:280", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,15:0:273-15:6:279", + "value": [ + { + "string": "nostar", + "raw_string": "nostar" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,15:9:282-15:15:288", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,15:10:283-15:15:288", + "value": [ + { + "string": "1star", + "raw_string": "1star" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,15:17:290-15:31:304", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,15:19:292-15:31:304", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,15:19:292-15:24:297", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,15:19:292-15:24:297", + "value": [ + { + "string": "class", + "raw_string": "class" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,15:26:299-15:30:303", + "value": [ + { + "string": "path", + "raw_string": "path" + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "attributes": { + "label": { + "value": "" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "minWidth": 0, + "minHeight": 0, + "label_dimensions": { + "width": 0, + "height": 0 + }, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "then" + }, + "style": { + "strokeWidth": { + "value": "4" + } + }, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + }, + "classes": [ + "path" + ] + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "nostar", + "id_val": "nostar", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,11:0:147-11:6:153", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,11:0:147-11:6:153", + "value": [ + { + "string": "nostar", + "raw_string": "nostar" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + }, + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,15:0:273-15:7:280", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,15:0:273-15:6:279", + "value": [ + { + "string": "nostar", + "raw_string": "nostar" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "style": { + "fill": { + "value": "orange" + } + }, + "near_key": null, + "shape": { + "value": "circle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + }, + "classes": [ + "dragon_ball" + ] + }, + "zIndex": 0 + }, + { + "id": "1star", + "id_val": "1star", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,12:0:178-12:5:183", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,12:0:178-12:5:183", + "value": [ + { + "string": "1star", + "raw_string": "1star" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + }, + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,15:9:282-15:15:288", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,15:10:283-15:15:288", + "value": [ + { + "string": "1star", + "raw_string": "1star" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "style": { + "fill": { + "value": "red" + } + }, + "near_key": null, + "shape": { + "value": "circle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + }, + "classes": [ + "dragon_ball" + ] + }, + "zIndex": 0 + }, + { + "id": "2star", + "id_val": "2star", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,13:0:229-13:5:234", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/classes.d2,13:0:229-13:5:234", + "value": [ + { + "string": "2star", + "raw_string": "2star" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "**" + }, + "style": { + "fill": { + "value": "orange" + } + }, + "near_key": null, + "shape": { + "value": "circle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + }, + "classes": [ + "dragon_ball" + ] + }, + "zIndex": 0 + } + ] + }, + "err": null +} diff --git a/testdata/d2compiler/TestCompile/missing-class.exp.json b/testdata/d2compiler/TestCompile/missing-class.exp.json new file mode 100644 index 000000000..6bd3ccd75 --- /dev/null +++ b/testdata/d2compiler/TestCompile/missing-class.exp.json @@ -0,0 +1,145 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2compiler/TestCompile/missing-class.d2,0:0:0-1:0:12", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/missing-class.d2,0:0:0-0:11:11", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/missing-class.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/missing-class.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/missing-class.d2,0:2:2-0:7:7", + "value": [ + { + "string": "class", + "raw_string": "class" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/missing-class.d2,0:9:9-0:11:11", + "value": [ + { + "string": "yo", + "raw_string": "yo" + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "attributes": { + "label": { + "value": "" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "x", + "id_val": "x", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/missing-class.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/missing-class.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/missing-class.d2,0:2:2-0:7:7", + "value": [ + { + "string": "class", + "raw_string": "class" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "x" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + }, + "classes": [ + "yo" + ] + }, + "zIndex": 0 + } + ] + }, + "err": null +} diff --git a/testdata/d2compiler/TestCompile/no-class-inside-classes.exp.json b/testdata/d2compiler/TestCompile/no-class-inside-classes.exp.json new file mode 100644 index 000000000..99c67b8e6 --- /dev/null +++ b/testdata/d2compiler/TestCompile/no-class-inside-classes.exp.json @@ -0,0 +1,12 @@ +{ + "graph": null, + "err": { + "ioerr": null, + "errs": [ + { + "range": "d2/testdata/d2compiler/TestCompile/no-class-inside-classes.d2,2:4:22-2:9:27", + "errmsg": "d2/testdata/d2compiler/TestCompile/no-class-inside-classes.d2:3:5: \"class\" cannot appear within \"classes\"" + } + ] + } +} diff --git a/testdata/d2compiler/TestCompile/no-class-primary.exp.json b/testdata/d2compiler/TestCompile/no-class-primary.exp.json new file mode 100644 index 000000000..dafb78a69 --- /dev/null +++ b/testdata/d2compiler/TestCompile/no-class-primary.exp.json @@ -0,0 +1,12 @@ +{ + "graph": null, + "err": { + "ioerr": null, + "errs": [ + { + "range": "d2/testdata/d2compiler/TestCompile/no-class-primary.d2,0:2:2-0:7:7", + "errmsg": "d2/testdata/d2compiler/TestCompile/no-class-primary.d2:1:3: class missing value" + } + ] + } +} diff --git a/testdata/d2compiler/TestCompile/reordered-classes.exp.json b/testdata/d2compiler/TestCompile/reordered-classes.exp.json new file mode 100644 index 000000000..8e52b2525 --- /dev/null +++ b/testdata/d2compiler/TestCompile/reordered-classes.exp.json @@ -0,0 +1,291 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,0:0:0-7:0:78", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,0:0:0-4:1:41", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,0:9:9-4:0:40", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,1:2:13-3:3:39", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,1:2:13-1:3:14", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,1:2:13-1:3:14", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,1:5:16-3:2:38", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,2:4:22-2:17:35", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,2:4:22-2:9:27", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,2:4:22-2:9:27", + "value": [ + { + "string": "shape", + "raw_string": "shape" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,2:11:29-2:17:35", + "value": [ + { + "string": "circle", + "raw_string": "circle" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,5:0:42-5:10:52", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,5:0:42-5:7:49", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,5:0:42-5:1:43", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,5:2:44-5:7:49", + "value": [ + { + "string": "class", + "raw_string": "class" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,5:9:51-5:10:52", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,6:0:53-6:24:77", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,6:0:53-6:15:68", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,6:0:53-6:7:60", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,6:8:61-6:9:62", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,6:10:63-6:15:68", + "value": [ + { + "string": "shape", + "raw_string": "shape" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,6:17:70-6:24:77", + "value": [ + { + "string": "diamond", + "raw_string": "diamond" + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "attributes": { + "label": { + "value": "" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + } + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "a", + "id_val": "a", + "label_dimensions": { + "width": 0, + "height": 0 + }, + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,5:0:42-5:7:49", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,5:0:42-5:1:43", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/reordered-classes.d2,5:2:44-5:7:49", + "value": [ + { + "string": "class", + "raw_string": "class" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "style": {}, + "near_key": null, + "shape": { + "value": "diamond" + }, + "direction": { + "value": "" + }, + "constraint": { + "value": "" + }, + "classes": [ + "x" + ] + }, + "zIndex": 0 + } + ] + }, + "err": null +} diff --git a/testdata/d2ir/TestCompile/classes/basic.exp.json b/testdata/d2ir/TestCompile/classes/basic.exp.json new file mode 100644 index 000000000..5b67fed1d --- /dev/null +++ b/testdata/d2ir/TestCompile/classes/basic.exp.json @@ -0,0 +1,504 @@ +{ + "fields": [ + { + "name": "x", + "references": [ + { + "string": { + "range": "TestCompile/classes/basic.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/basic.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/basic.d2,0:0:0-0:1:1", + "key": { + "range": "TestCompile/classes/basic.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "classes", + "composite": { + "fields": [ + { + "name": "mango", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/basic.d2,3:16:40-3:22:46", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/basic.d2,3:10:34-3:14:38", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/basic.d2,3:4:28-3:14:38", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,3:4:28-3:9:33", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,3:10:34-3:14:38", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/basic.d2,3:4:28-3:22:46", + "key": { + "range": "TestCompile/classes/basic.d2,3:4:28-3:14:38", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,3:4:28-3:9:33", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,3:10:34-3:14:38", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,3:16:40-3:22:46", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/basic.d2,3:4:28-3:9:33", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/basic.d2,3:4:28-3:14:38", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,3:4:28-3:9:33", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,3:10:34-3:14:38", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/basic.d2,3:4:28-3:22:46", + "key": { + "range": "TestCompile/classes/basic.d2,3:4:28-3:14:38", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,3:4:28-3:9:33", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,3:10:34-3:14:38", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,3:16:40-3:22:46", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/basic.d2,2:2:15-2:7:20", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/basic.d2,2:2:15-2:7:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,2:2:15-2:7:20", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/basic.d2,2:2:15-4:3:50", + "key": { + "range": "TestCompile/classes/basic.d2,2:2:15-2:7:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,2:2:15-2:7:20", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/basic.d2,2:9:22-4:2:49", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/basic.d2,3:4:28-3:22:46", + "key": { + "range": "TestCompile/classes/basic.d2,3:4:28-3:14:38", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,3:4:28-3:9:33", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,3:10:34-3:14:38", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,3:16:40-3:22:46", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/basic.d2,1:0:2-1:7:9", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/basic.d2,1:0:2-1:7:9", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,1:0:2-1:7:9", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/basic.d2,1:0:2-5:1:52", + "key": { + "range": "TestCompile/classes/basic.d2,1:0:2-1:7:9", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,1:0:2-1:7:9", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/basic.d2,1:9:11-5:0:51", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/basic.d2,2:2:15-4:3:50", + "key": { + "range": "TestCompile/classes/basic.d2,2:2:15-2:7:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,2:2:15-2:7:20", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/basic.d2,2:9:22-4:2:49", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/basic.d2,3:4:28-3:22:46", + "key": { + "range": "TestCompile/classes/basic.d2,3:4:28-3:14:38", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,3:4:28-3:9:33", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,3:10:34-3:14:38", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/basic.d2,3:16:40-3:22:46", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/classes/inherited.exp.json b/testdata/d2ir/TestCompile/classes/inherited.exp.json new file mode 100644 index 000000000..8e5054f05 --- /dev/null +++ b/testdata/d2ir/TestCompile/classes/inherited.exp.json @@ -0,0 +1,9684 @@ +{ + "fields": [ + { + "name": "classes", + "composite": { + "fields": [ + { + "name": "mango", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-3:3:48", + "key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,1:9:20-3:2:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,0:0:0-4:1:50", + "key": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,0:9:9-4:0:49", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-3:3:48", + "key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,1:9:20-3:2:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + }, + { + "name": "scenarios", + "composite": { + "fields": [ + { + "name": "hawaii", + "composite": { + "fields": [ + { + "name": "classes", + "composite": { + "fields": [ + { + "name": "mango", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-3:3:48", + "key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,1:9:20-3:2:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,0:0:0-4:1:50", + "key": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,0:9:9-4:0:49", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-3:3:48", + "key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,1:9:20-3:2:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + }, + { + "name": "steps", + "composite": { + "fields": [ + { + "name": "1", + "composite": { + "fields": [ + { + "name": "classes", + "composite": { + "fields": [ + { + "name": "mango", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-3:3:48", + "key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,1:9:20-3:2:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + }, + { + "name": "cherry", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-12:11:176", + "key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,10:18:135-12:10:175", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,0:0:0-4:1:50", + "key": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,0:9:9-4:0:49", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-3:3:48", + "key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,1:9:20-3:2:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,9:8:106-13:9:186", + "key": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,9:17:115-13:8:185", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-12:11:176", + "key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,10:18:135-12:10:175", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + }, + { + "name": "x", + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "key": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,8:6:93-8:7:94", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,8:6:93-8:7:94", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,8:6:93-8:7:94", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,8:6:93-15:7:204", + "key": { + "range": "TestCompile/classes/inherited.d2,8:6:93-8:7:94", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,8:6:93-8:7:94", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,8:9:96-15:6:203", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,9:8:106-13:9:186", + "key": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,9:17:115-13:8:185", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-12:11:176", + "key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,10:18:135-12:10:175", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "key": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + } + ] + }, + { + "name": "2", + "composite": { + "fields": [ + { + "name": "classes", + "composite": { + "fields": [ + { + "name": "mango", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-3:3:48", + "key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,1:9:20-3:2:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + }, + { + "name": "cherry", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-12:11:176", + "key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,10:18:135-12:10:175", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,0:0:0-4:1:50", + "key": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,0:9:9-4:0:49", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-3:3:48", + "key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,1:9:20-3:2:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,9:8:106-13:9:186", + "key": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,9:17:115-13:8:185", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-12:11:176", + "key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,10:18:135-12:10:175", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + }, + { + "name": "x", + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "key": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "y", + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "key": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,16:6:211-16:7:212", + "value": [ + { + "string": "2", + "raw_string": "2" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,16:6:211-16:7:212", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,16:6:211-16:7:212", + "value": [ + { + "string": "2", + "raw_string": "2" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,16:6:211-18:7:233", + "key": { + "range": "TestCompile/classes/inherited.d2,16:6:211-16:7:212", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,16:6:211-16:7:212", + "value": [ + { + "string": "2", + "raw_string": "2" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,16:9:214-18:6:232", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "key": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + } + ] + }, + { + "name": "3", + "composite": { + "fields": [ + { + "name": "classes", + "composite": { + "fields": [ + { + "name": "mango", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-3:3:48", + "key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,1:9:20-3:2:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + }, + { + "name": "cherry", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312", + "value": [ + { + "string": "blue", + "raw_string": "blue" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:28:312", + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312", + "value": [ + { + "string": "blue", + "raw_string": "blue" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:28:312", + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312", + "value": [ + { + "string": "blue", + "raw_string": "blue" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-12:11:176", + "key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,10:18:135-12:10:175", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,21:10:274-23:11:324", + "key": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,21:18:282-23:10:323", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:28:312", + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312", + "value": [ + { + "string": "blue", + "raw_string": "blue" + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,0:0:0-4:1:50", + "key": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,0:9:9-4:0:49", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-3:3:48", + "key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,1:9:20-3:2:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,9:8:106-13:9:186", + "key": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,9:17:115-13:8:185", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-12:11:176", + "key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,10:18:135-12:10:175", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,20:8:253-24:9:334", + "key": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,20:17:262-24:8:333", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,21:10:274-23:11:324", + "key": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,21:18:282-23:10:323", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:28:312", + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312", + "value": [ + { + "string": "blue", + "raw_string": "blue" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + }, + { + "name": "x", + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "key": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "y", + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "key": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + }, + { + "string": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "key": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,19:6:240-19:7:241", + "value": [ + { + "string": "3", + "raw_string": "3" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,19:6:240-19:7:241", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,19:6:240-19:7:241", + "value": [ + { + "string": "3", + "raw_string": "3" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,19:6:240-26:7:352", + "key": { + "range": "TestCompile/classes/inherited.d2,19:6:240-19:7:241", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,19:6:240-19:7:241", + "value": [ + { + "string": "3", + "raw_string": "3" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,19:9:243-26:6:351", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,20:8:253-24:9:334", + "key": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,20:17:262-24:8:333", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,21:10:274-23:11:324", + "key": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,21:18:282-23:10:323", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:28:312", + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312", + "value": [ + { + "string": "blue", + "raw_string": "blue" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "key": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + } + ] + }, + { + "name": "4", + "composite": { + "fields": [ + { + "name": "classes", + "composite": { + "fields": [ + { + "name": "mango", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-3:3:48", + "key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,1:9:20-3:2:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + }, + { + "name": "cherry", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312", + "value": [ + { + "string": "blue", + "raw_string": "blue" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:28:312", + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312", + "value": [ + { + "string": "blue", + "raw_string": "blue" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:28:312", + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312", + "value": [ + { + "string": "blue", + "raw_string": "blue" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-12:11:176", + "key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,10:18:135-12:10:175", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,21:10:274-23:11:324", + "key": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,21:18:282-23:10:323", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:28:312", + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312", + "value": [ + { + "string": "blue", + "raw_string": "blue" + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,0:0:0-4:1:50", + "key": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,0:9:9-4:0:49", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-3:3:48", + "key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,1:9:20-3:2:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,9:8:106-13:9:186", + "key": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,9:17:115-13:8:185", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-12:11:176", + "key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,10:18:135-12:10:175", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,20:8:253-24:9:334", + "key": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,20:17:262-24:8:333", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,21:10:274-23:11:324", + "key": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,21:18:282-23:10:323", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:28:312", + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312", + "value": [ + { + "string": "blue", + "raw_string": "blue" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + }, + { + "name": "x", + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "key": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + }, + { + "string": { + "range": "TestCompile/classes/inherited.d2,33:8:444-33:9:445", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,33:8:444-33:9:445", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,33:8:444-33:9:445", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,33:8:444-33:9:445", + "key": { + "range": "TestCompile/classes/inherited.d2,33:8:444-33:9:445", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,33:8:444-33:9:445", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "y", + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "key": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + }, + { + "string": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "key": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "layers", + "composite": { + "fields": [ + { + "name": "deep", + "composite": { + "fields": [ + { + "name": "x", + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "key": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "classes", + "composite": { + "fields": [ + { + "name": "mango", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-3:3:48", + "key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,1:9:20-3:2:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + }, + { + "name": "cherry", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312", + "value": [ + { + "string": "blue", + "raw_string": "blue" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:28:312", + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312", + "value": [ + { + "string": "blue", + "raw_string": "blue" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:28:312", + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312", + "value": [ + { + "string": "blue", + "raw_string": "blue" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-12:11:176", + "key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,10:18:135-12:10:175", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,21:10:274-23:11:324", + "key": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,21:18:282-23:10:323", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:28:312", + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312", + "value": [ + { + "string": "blue", + "raw_string": "blue" + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,0:0:0-4:1:50", + "key": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,0:9:9-4:0:49", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-3:3:48", + "key": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,1:9:20-3:2:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,9:8:106-13:9:186", + "key": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,9:17:115-13:8:185", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-12:11:176", + "key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,10:18:135-12:10:175", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,20:8:253-24:9:334", + "key": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,20:17:262-24:8:333", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,21:10:274-23:11:324", + "key": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,21:18:282-23:10:323", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:28:312", + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312", + "value": [ + { + "string": "blue", + "raw_string": "blue" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,29:10:392-29:14:396", + "value": [ + { + "string": "deep", + "raw_string": "deep" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,29:10:392-29:14:396", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,29:10:392-29:14:396", + "value": [ + { + "string": "deep", + "raw_string": "deep" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,29:10:392-31:11:425", + "key": { + "range": "TestCompile/classes/inherited.d2,29:10:392-29:14:396", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,29:10:392-29:14:396", + "value": [ + { + "string": "deep", + "raw_string": "deep" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,29:16:398-31:10:424", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "key": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,28:8:372-28:14:378", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,28:8:372-28:14:378", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,28:8:372-28:14:378", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,28:8:372-32:9:435", + "key": { + "range": "TestCompile/classes/inherited.d2,28:8:372-28:14:378", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,28:8:372-28:14:378", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,28:16:380-32:8:434", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,29:10:392-31:11:425", + "key": { + "range": "TestCompile/classes/inherited.d2,29:10:392-29:14:396", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,29:10:392-29:14:396", + "value": [ + { + "string": "deep", + "raw_string": "deep" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,29:16:398-31:10:424", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "key": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,27:6:359-27:7:360", + "value": [ + { + "string": "4", + "raw_string": "4" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,27:6:359-27:7:360", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,27:6:359-27:7:360", + "value": [ + { + "string": "4", + "raw_string": "4" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,27:6:359-34:7:453", + "key": { + "range": "TestCompile/classes/inherited.d2,27:6:359-27:7:360", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,27:6:359-27:7:360", + "value": [ + { + "string": "4", + "raw_string": "4" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,27:9:362-34:6:452", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,28:8:372-32:9:435", + "key": { + "range": "TestCompile/classes/inherited.d2,28:8:372-28:14:378", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,28:8:372-28:14:378", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,28:16:380-32:8:434", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,29:10:392-31:11:425", + "key": { + "range": "TestCompile/classes/inherited.d2,29:10:392-29:14:396", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,29:10:392-29:14:396", + "value": [ + { + "string": "deep", + "raw_string": "deep" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,29:16:398-31:10:424", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "key": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,33:8:444-33:9:445", + "key": { + "range": "TestCompile/classes/inherited.d2,33:8:444-33:9:445", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,33:8:444-33:9:445", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,7:2:78-7:7:83", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,7:2:78-7:7:83", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,7:2:78-7:7:83", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,7:2:78-35:5:459", + "key": { + "range": "TestCompile/classes/inherited.d2,7:2:78-7:7:83", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,7:2:78-7:7:83", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,7:9:85-35:4:458", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,8:6:93-15:7:204", + "key": { + "range": "TestCompile/classes/inherited.d2,8:6:93-8:7:94", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,8:6:93-8:7:94", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,8:9:96-15:6:203", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,9:8:106-13:9:186", + "key": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,9:17:115-13:8:185", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-12:11:176", + "key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,10:18:135-12:10:175", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "key": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,16:6:211-18:7:233", + "key": { + "range": "TestCompile/classes/inherited.d2,16:6:211-16:7:212", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,16:6:211-16:7:212", + "value": [ + { + "string": "2", + "raw_string": "2" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,16:9:214-18:6:232", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "key": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,19:6:240-26:7:352", + "key": { + "range": "TestCompile/classes/inherited.d2,19:6:240-19:7:241", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,19:6:240-19:7:241", + "value": [ + { + "string": "3", + "raw_string": "3" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,19:9:243-26:6:351", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,20:8:253-24:9:334", + "key": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,20:17:262-24:8:333", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,21:10:274-23:11:324", + "key": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,21:18:282-23:10:323", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:28:312", + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312", + "value": [ + { + "string": "blue", + "raw_string": "blue" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "key": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,27:6:359-34:7:453", + "key": { + "range": "TestCompile/classes/inherited.d2,27:6:359-27:7:360", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,27:6:359-27:7:360", + "value": [ + { + "string": "4", + "raw_string": "4" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,27:9:362-34:6:452", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,28:8:372-32:9:435", + "key": { + "range": "TestCompile/classes/inherited.d2,28:8:372-28:14:378", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,28:8:372-28:14:378", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,28:16:380-32:8:434", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,29:10:392-31:11:425", + "key": { + "range": "TestCompile/classes/inherited.d2,29:10:392-29:14:396", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,29:10:392-29:14:396", + "value": [ + { + "string": "deep", + "raw_string": "deep" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,29:16:398-31:10:424", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "key": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,33:8:444-33:9:445", + "key": { + "range": "TestCompile/classes/inherited.d2,33:8:444-33:9:445", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,33:8:444-33:9:445", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,6:2:66-6:8:72", + "value": [ + { + "string": "hawaii", + "raw_string": "hawaii" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,6:2:66-6:8:72", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,6:2:66-6:8:72", + "value": [ + { + "string": "hawaii", + "raw_string": "hawaii" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,6:2:66-36:3:463", + "key": { + "range": "TestCompile/classes/inherited.d2,6:2:66-6:8:72", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,6:2:66-6:8:72", + "value": [ + { + "string": "hawaii", + "raw_string": "hawaii" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,6:10:74-36:2:462", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,7:2:78-35:5:459", + "key": { + "range": "TestCompile/classes/inherited.d2,7:2:78-7:7:83", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,7:2:78-7:7:83", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,7:9:85-35:4:458", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,8:6:93-15:7:204", + "key": { + "range": "TestCompile/classes/inherited.d2,8:6:93-8:7:94", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,8:6:93-8:7:94", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,8:9:96-15:6:203", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,9:8:106-13:9:186", + "key": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,9:17:115-13:8:185", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-12:11:176", + "key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,10:18:135-12:10:175", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "key": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,16:6:211-18:7:233", + "key": { + "range": "TestCompile/classes/inherited.d2,16:6:211-16:7:212", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,16:6:211-16:7:212", + "value": [ + { + "string": "2", + "raw_string": "2" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,16:9:214-18:6:232", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "key": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,19:6:240-26:7:352", + "key": { + "range": "TestCompile/classes/inherited.d2,19:6:240-19:7:241", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,19:6:240-19:7:241", + "value": [ + { + "string": "3", + "raw_string": "3" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,19:9:243-26:6:351", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,20:8:253-24:9:334", + "key": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,20:17:262-24:8:333", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,21:10:274-23:11:324", + "key": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,21:18:282-23:10:323", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:28:312", + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312", + "value": [ + { + "string": "blue", + "raw_string": "blue" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "key": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,27:6:359-34:7:453", + "key": { + "range": "TestCompile/classes/inherited.d2,27:6:359-27:7:360", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,27:6:359-27:7:360", + "value": [ + { + "string": "4", + "raw_string": "4" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,27:9:362-34:6:452", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,28:8:372-32:9:435", + "key": { + "range": "TestCompile/classes/inherited.d2,28:8:372-28:14:378", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,28:8:372-28:14:378", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,28:16:380-32:8:434", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,29:10:392-31:11:425", + "key": { + "range": "TestCompile/classes/inherited.d2,29:10:392-29:14:396", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,29:10:392-29:14:396", + "value": [ + { + "string": "deep", + "raw_string": "deep" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,29:16:398-31:10:424", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "key": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,33:8:444-33:9:445", + "key": { + "range": "TestCompile/classes/inherited.d2,33:8:444-33:9:445", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,33:8:444-33:9:445", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/inherited.d2,5:0:51-5:9:60", + "value": [ + { + "string": "scenarios", + "raw_string": "scenarios" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/inherited.d2,5:0:51-5:9:60", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,5:0:51-5:9:60", + "value": [ + { + "string": "scenarios", + "raw_string": "scenarios" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/inherited.d2,5:0:51-37:1:465", + "key": { + "range": "TestCompile/classes/inherited.d2,5:0:51-5:9:60", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,5:0:51-5:9:60", + "value": [ + { + "string": "scenarios", + "raw_string": "scenarios" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,5:11:62-37:0:464", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,6:2:66-36:3:463", + "key": { + "range": "TestCompile/classes/inherited.d2,6:2:66-6:8:72", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,6:2:66-6:8:72", + "value": [ + { + "string": "hawaii", + "raw_string": "hawaii" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,6:10:74-36:2:462", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,7:2:78-35:5:459", + "key": { + "range": "TestCompile/classes/inherited.d2,7:2:78-7:7:83", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,7:2:78-7:7:83", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,7:9:85-35:4:458", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,8:6:93-15:7:204", + "key": { + "range": "TestCompile/classes/inherited.d2,8:6:93-8:7:94", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,8:6:93-8:7:94", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,8:9:96-15:6:203", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,9:8:106-13:9:186", + "key": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,9:8:106-9:15:113", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,9:17:115-13:8:185", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-12:11:176", + "key": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,10:18:135-12:10:175", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:27:164", + "key": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:22:159", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "key": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,16:6:211-18:7:233", + "key": { + "range": "TestCompile/classes/inherited.d2,16:6:211-16:7:212", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,16:6:211-16:7:212", + "value": [ + { + "string": "2", + "raw_string": "2" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,16:9:214-18:6:232", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "key": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,19:6:240-26:7:352", + "key": { + "range": "TestCompile/classes/inherited.d2,19:6:240-19:7:241", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,19:6:240-19:7:241", + "value": [ + { + "string": "3", + "raw_string": "3" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,19:9:243-26:6:351", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,20:8:253-24:9:334", + "key": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,20:8:253-20:15:260", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,20:17:262-24:8:333", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,21:10:274-23:11:324", + "key": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,21:10:274-21:16:280", + "value": [ + { + "string": "cherry", + "raw_string": "cherry" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,21:18:282-23:10:323", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:28:312", + "key": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:22:306", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:12:296-22:17:301", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:18:302-22:22:306", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312", + "value": [ + { + "string": "blue", + "raw_string": "blue" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "key": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,25:8:343-25:9:344", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,27:6:359-34:7:453", + "key": { + "range": "TestCompile/classes/inherited.d2,27:6:359-27:7:360", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,27:6:359-27:7:360", + "value": [ + { + "string": "4", + "raw_string": "4" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,27:9:362-34:6:452", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,28:8:372-32:9:435", + "key": { + "range": "TestCompile/classes/inherited.d2,28:8:372-28:14:378", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,28:8:372-28:14:378", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,28:16:380-32:8:434", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,29:10:392-31:11:425", + "key": { + "range": "TestCompile/classes/inherited.d2,29:10:392-29:14:396", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,29:10:392-29:14:396", + "value": [ + { + "string": "deep", + "raw_string": "deep" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/inherited.d2,29:16:398-31:10:424", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "key": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/inherited.d2,33:8:444-33:9:445", + "key": { + "range": "TestCompile/classes/inherited.d2,33:8:444-33:9:445", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/inherited.d2,33:8:444-33:9:445", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/classes/layer-modify.exp.json b/testdata/d2ir/TestCompile/classes/layer-modify.exp.json new file mode 100644 index 000000000..b1fdcab52 --- /dev/null +++ b/testdata/d2ir/TestCompile/classes/layer-modify.exp.json @@ -0,0 +1,1583 @@ +{ + "fields": [ + { + "name": "classes", + "composite": { + "fields": [ + { + "name": "orb", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/layer-modify.d2,2:16:36-2:22:42", + "value": [ + { + "string": "yellow", + "raw_string": "yellow" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/layer-modify.d2,2:10:30-2:14:34", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:14:34", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:9:29", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:10:30-2:14:34", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:22:42", + "key": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:14:34", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:9:29", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:10:30-2:14:34", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:16:36-2:22:42", + "value": [ + { + "string": "yellow", + "raw_string": "yellow" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:9:29", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:14:34", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:9:29", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:10:30-2:14:34", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:22:42", + "key": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:14:34", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:9:29", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:10:30-2:14:34", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:16:36-2:22:42", + "value": [ + { + "string": "yellow", + "raw_string": "yellow" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/layer-modify.d2,1:2:13-1:5:16", + "value": [ + { + "string": "orb", + "raw_string": "orb" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/layer-modify.d2,1:2:13-1:5:16", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,1:2:13-1:5:16", + "value": [ + { + "string": "orb", + "raw_string": "orb" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/layer-modify.d2,1:2:13-3:3:46", + "key": { + "range": "TestCompile/classes/layer-modify.d2,1:2:13-1:5:16", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,1:2:13-1:5:16", + "value": [ + { + "string": "orb", + "raw_string": "orb" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/layer-modify.d2,1:7:18-3:2:45", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:22:42", + "key": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:14:34", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:9:29", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:10:30-2:14:34", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:16:36-2:22:42", + "value": [ + { + "string": "yellow", + "raw_string": "yellow" + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/layer-modify.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/layer-modify.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/layer-modify.d2,0:0:0-4:1:48", + "key": { + "range": "TestCompile/classes/layer-modify.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/layer-modify.d2,0:9:9-4:0:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/layer-modify.d2,1:2:13-3:3:46", + "key": { + "range": "TestCompile/classes/layer-modify.d2,1:2:13-1:5:16", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,1:2:13-1:5:16", + "value": [ + { + "string": "orb", + "raw_string": "orb" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/layer-modify.d2,1:7:18-3:2:45", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:22:42", + "key": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:14:34", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:9:29", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:10:30-2:14:34", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:16:36-2:22:42", + "value": [ + { + "string": "yellow", + "raw_string": "yellow" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + }, + { + "name": "layers", + "composite": { + "fields": [ + { + "name": "x", + "composite": { + "fields": [ + { + "name": "classes", + "composite": { + "fields": [ + { + "name": "orb", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/layer-modify.d2,2:16:36-2:22:42", + "value": [ + { + "string": "yellow", + "raw_string": "yellow" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/layer-modify.d2,2:10:30-2:14:34", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:14:34", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:9:29", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:10:30-2:14:34", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:22:42", + "key": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:14:34", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:9:29", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:10:30-2:14:34", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:16:36-2:22:42", + "value": [ + { + "string": "yellow", + "raw_string": "yellow" + } + ] + } + } + } + } + } + ] + }, + { + "name": "stroke", + "primary": { + "value": { + "range": "TestCompile/classes/layer-modify.d2,7:30:96-7:33:99", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/layer-modify.d2,7:22:88-7:28:94", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/layer-modify.d2,7:4:70-7:28:94", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:4:70-7:11:77", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:12:78-7:15:81", + "value": [ + { + "string": "orb", + "raw_string": "orb" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:16:82-7:21:87", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:22:88-7:28:94", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/layer-modify.d2,7:4:70-7:33:99", + "key": { + "range": "TestCompile/classes/layer-modify.d2,7:4:70-7:28:94", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:4:70-7:11:77", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:12:78-7:15:81", + "value": [ + { + "string": "orb", + "raw_string": "orb" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:16:82-7:21:87", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:22:88-7:28:94", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:30:96-7:33:99", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:9:29", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:14:34", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:9:29", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:10:30-2:14:34", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:22:42", + "key": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:14:34", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:9:29", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:10:30-2:14:34", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:16:36-2:22:42", + "value": [ + { + "string": "yellow", + "raw_string": "yellow" + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/classes/layer-modify.d2,7:16:82-7:21:87", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/layer-modify.d2,7:4:70-7:28:94", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:4:70-7:11:77", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:12:78-7:15:81", + "value": [ + { + "string": "orb", + "raw_string": "orb" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:16:82-7:21:87", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:22:88-7:28:94", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/layer-modify.d2,7:4:70-7:33:99", + "key": { + "range": "TestCompile/classes/layer-modify.d2,7:4:70-7:28:94", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:4:70-7:11:77", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:12:78-7:15:81", + "value": [ + { + "string": "orb", + "raw_string": "orb" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:16:82-7:21:87", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:22:88-7:28:94", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:30:96-7:33:99", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/layer-modify.d2,1:2:13-1:5:16", + "value": [ + { + "string": "orb", + "raw_string": "orb" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/layer-modify.d2,1:2:13-1:5:16", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,1:2:13-1:5:16", + "value": [ + { + "string": "orb", + "raw_string": "orb" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/layer-modify.d2,1:2:13-3:3:46", + "key": { + "range": "TestCompile/classes/layer-modify.d2,1:2:13-1:5:16", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,1:2:13-1:5:16", + "value": [ + { + "string": "orb", + "raw_string": "orb" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/layer-modify.d2,1:7:18-3:2:45", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:22:42", + "key": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:14:34", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:9:29", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:10:30-2:14:34", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:16:36-2:22:42", + "value": [ + { + "string": "yellow", + "raw_string": "yellow" + } + ] + } + } + } + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/classes/layer-modify.d2,7:12:78-7:15:81", + "value": [ + { + "string": "orb", + "raw_string": "orb" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/layer-modify.d2,7:4:70-7:28:94", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:4:70-7:11:77", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:12:78-7:15:81", + "value": [ + { + "string": "orb", + "raw_string": "orb" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:16:82-7:21:87", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:22:88-7:28:94", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/layer-modify.d2,7:4:70-7:33:99", + "key": { + "range": "TestCompile/classes/layer-modify.d2,7:4:70-7:28:94", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:4:70-7:11:77", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:12:78-7:15:81", + "value": [ + { + "string": "orb", + "raw_string": "orb" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:16:82-7:21:87", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:22:88-7:28:94", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:30:96-7:33:99", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/layer-modify.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/layer-modify.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/layer-modify.d2,0:0:0-4:1:48", + "key": { + "range": "TestCompile/classes/layer-modify.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/layer-modify.d2,0:9:9-4:0:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/layer-modify.d2,1:2:13-3:3:46", + "key": { + "range": "TestCompile/classes/layer-modify.d2,1:2:13-1:5:16", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,1:2:13-1:5:16", + "value": [ + { + "string": "orb", + "raw_string": "orb" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/layer-modify.d2,1:7:18-3:2:45", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:22:42", + "key": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:14:34", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:4:24-2:9:29", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:10:30-2:14:34", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,2:16:36-2:22:42", + "value": [ + { + "string": "yellow", + "raw_string": "yellow" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/layer-modify.d2,6:2:61-6:3:62", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/layer-modify.d2,6:2:61-6:3:62", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,6:2:61-6:3:62", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/layer-modify.d2,6:2:61-8:3:103", + "key": { + "range": "TestCompile/classes/layer-modify.d2,6:2:61-6:3:62", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,6:2:61-6:3:62", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/layer-modify.d2,6:5:64-8:2:102", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/layer-modify.d2,7:4:70-7:33:99", + "key": { + "range": "TestCompile/classes/layer-modify.d2,7:4:70-7:28:94", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:4:70-7:11:77", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:12:78-7:15:81", + "value": [ + { + "string": "orb", + "raw_string": "orb" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:16:82-7:21:87", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:22:88-7:28:94", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:30:96-7:33:99", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/layer-modify.d2,5:0:49-5:6:55", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/layer-modify.d2,5:0:49-5:6:55", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,5:0:49-5:6:55", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/layer-modify.d2,5:0:49-9:1:105", + "key": { + "range": "TestCompile/classes/layer-modify.d2,5:0:49-5:6:55", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,5:0:49-5:6:55", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/layer-modify.d2,5:8:57-9:0:104", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/layer-modify.d2,6:2:61-8:3:103", + "key": { + "range": "TestCompile/classes/layer-modify.d2,6:2:61-6:3:62", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,6:2:61-6:3:62", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/layer-modify.d2,6:5:64-8:2:102", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/layer-modify.d2,7:4:70-7:33:99", + "key": { + "range": "TestCompile/classes/layer-modify.d2,7:4:70-7:28:94", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:4:70-7:11:77", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:12:78-7:15:81", + "value": [ + { + "string": "orb", + "raw_string": "orb" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:16:82-7:21:87", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:22:88-7:28:94", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/layer-modify.d2,7:30:96-7:33:99", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/classes/merge-classes.exp.json b/testdata/d2ir/TestCompile/classes/merge-classes.exp.json new file mode 100644 index 000000000..4c52c1b60 --- /dev/null +++ b/testdata/d2ir/TestCompile/classes/merge-classes.exp.json @@ -0,0 +1,1202 @@ +{ + "fields": [ + { + "name": "classes", + "composite": { + "fields": [ + { + "name": "mango", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/merge-classes.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge-classes.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge-classes.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge-classes.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/merge-classes.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge-classes.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge-classes.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge-classes.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/merge-classes.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + }, + { + "name": "width", + "primary": { + "value": { + "range": "TestCompile/classes/merge-classes.d2,3:9:54-3:11:56", + "raw": "10", + "value": "10" + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge-classes.d2,3:2:47-3:7:52", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge-classes.d2,3:2:47-3:7:52", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,3:2:47-3:7:52", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge-classes.d2,3:2:47-3:11:56", + "key": { + "range": "TestCompile/classes/merge-classes.d2,3:2:47-3:7:52", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,3:2:47-3:7:52", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/classes/merge-classes.d2,3:9:54-3:11:56", + "raw": "10", + "value": "10" + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge-classes.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge-classes.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge-classes.d2,1:2:13-4:3:60", + "key": { + "range": "TestCompile/classes/merge-classes.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge-classes.d2,1:9:20-4:2:59", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge-classes.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/merge-classes.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/merge-classes.d2,3:2:47-3:11:56", + "key": { + "range": "TestCompile/classes/merge-classes.d2,3:2:47-3:7:52", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,3:2:47-3:7:52", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/classes/merge-classes.d2,3:9:54-3:11:56", + "raw": "10", + "value": "10" + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge-classes.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge-classes.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge-classes.d2,0:0:0-5:1:62", + "key": { + "range": "TestCompile/classes/merge-classes.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge-classes.d2,0:9:9-5:0:61", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge-classes.d2,1:2:13-4:3:60", + "key": { + "range": "TestCompile/classes/merge-classes.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge-classes.d2,1:9:20-4:2:59", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge-classes.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/merge-classes.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/merge-classes.d2,3:2:47-3:11:56", + "key": { + "range": "TestCompile/classes/merge-classes.d2,3:2:47-3:7:52", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,3:2:47-3:7:52", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/classes/merge-classes.d2,3:9:54-3:11:56", + "raw": "10", + "value": "10" + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + }, + { + "name": "layers", + "composite": { + "fields": [ + { + "name": "hawaii", + "composite": { + "fields": [ + { + "name": "classes", + "composite": { + "fields": [ + { + "name": "mango", + "composite": { + "fields": [ + { + "name": "width", + "primary": { + "value": { + "range": "TestCompile/classes/merge-classes.d2,10:15:130-10:19:134", + "raw": "9000", + "value": "9000" + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge-classes.d2,10:8:123-10:13:128", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge-classes.d2,10:8:123-10:13:128", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,10:8:123-10:13:128", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge-classes.d2,10:8:123-10:19:134", + "key": { + "range": "TestCompile/classes/merge-classes.d2,10:8:123-10:13:128", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,10:8:123-10:13:128", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/classes/merge-classes.d2,10:15:130-10:19:134", + "raw": "9000", + "value": "9000" + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge-classes.d2,9:6:106-9:11:111", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge-classes.d2,9:6:106-9:11:111", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,9:6:106-9:11:111", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge-classes.d2,9:6:106-11:7:142", + "key": { + "range": "TestCompile/classes/merge-classes.d2,9:6:106-9:11:111", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,9:6:106-9:11:111", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge-classes.d2,9:13:113-11:6:141", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge-classes.d2,10:8:123-10:19:134", + "key": { + "range": "TestCompile/classes/merge-classes.d2,10:8:123-10:13:128", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,10:8:123-10:13:128", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/classes/merge-classes.d2,10:15:130-10:19:134", + "raw": "9000", + "value": "9000" + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge-classes.d2,8:4:89-8:11:96", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge-classes.d2,8:4:89-8:11:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,8:4:89-8:11:96", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge-classes.d2,8:4:89-12:5:148", + "key": { + "range": "TestCompile/classes/merge-classes.d2,8:4:89-8:11:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,8:4:89-8:11:96", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge-classes.d2,8:13:98-12:4:147", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge-classes.d2,9:6:106-11:7:142", + "key": { + "range": "TestCompile/classes/merge-classes.d2,9:6:106-9:11:111", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,9:6:106-9:11:111", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge-classes.d2,9:13:113-11:6:141", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge-classes.d2,10:8:123-10:19:134", + "key": { + "range": "TestCompile/classes/merge-classes.d2,10:8:123-10:13:128", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,10:8:123-10:13:128", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/classes/merge-classes.d2,10:15:130-10:19:134", + "raw": "9000", + "value": "9000" + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge-classes.d2,7:2:75-7:8:81", + "value": [ + { + "string": "hawaii", + "raw_string": "hawaii" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge-classes.d2,7:2:75-7:8:81", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,7:2:75-7:8:81", + "value": [ + { + "string": "hawaii", + "raw_string": "hawaii" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge-classes.d2,7:2:75-13:3:152", + "key": { + "range": "TestCompile/classes/merge-classes.d2,7:2:75-7:8:81", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,7:2:75-7:8:81", + "value": [ + { + "string": "hawaii", + "raw_string": "hawaii" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge-classes.d2,7:10:83-13:2:151", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge-classes.d2,8:4:89-12:5:148", + "key": { + "range": "TestCompile/classes/merge-classes.d2,8:4:89-8:11:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,8:4:89-8:11:96", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge-classes.d2,8:13:98-12:4:147", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge-classes.d2,9:6:106-11:7:142", + "key": { + "range": "TestCompile/classes/merge-classes.d2,9:6:106-9:11:111", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,9:6:106-9:11:111", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge-classes.d2,9:13:113-11:6:141", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge-classes.d2,10:8:123-10:19:134", + "key": { + "range": "TestCompile/classes/merge-classes.d2,10:8:123-10:13:128", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,10:8:123-10:13:128", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/classes/merge-classes.d2,10:15:130-10:19:134", + "raw": "9000", + "value": "9000" + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge-classes.d2,6:0:63-6:6:69", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge-classes.d2,6:0:63-6:6:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,6:0:63-6:6:69", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge-classes.d2,6:0:63-14:1:154", + "key": { + "range": "TestCompile/classes/merge-classes.d2,6:0:63-6:6:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,6:0:63-6:6:69", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge-classes.d2,6:8:71-14:0:153", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge-classes.d2,7:2:75-13:3:152", + "key": { + "range": "TestCompile/classes/merge-classes.d2,7:2:75-7:8:81", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,7:2:75-7:8:81", + "value": [ + { + "string": "hawaii", + "raw_string": "hawaii" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge-classes.d2,7:10:83-13:2:151", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge-classes.d2,8:4:89-12:5:148", + "key": { + "range": "TestCompile/classes/merge-classes.d2,8:4:89-8:11:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,8:4:89-8:11:96", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge-classes.d2,8:13:98-12:4:147", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge-classes.d2,9:6:106-11:7:142", + "key": { + "range": "TestCompile/classes/merge-classes.d2,9:6:106-9:11:111", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,9:6:106-9:11:111", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge-classes.d2,9:13:113-11:6:141", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge-classes.d2,10:8:123-10:19:134", + "key": { + "range": "TestCompile/classes/merge-classes.d2,10:8:123-10:13:128", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge-classes.d2,10:8:123-10:13:128", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/classes/merge-classes.d2,10:15:130-10:19:134", + "raw": "9000", + "value": "9000" + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/classes/merge.exp.json b/testdata/d2ir/TestCompile/classes/merge.exp.json new file mode 100644 index 000000000..9cc9a1320 --- /dev/null +++ b/testdata/d2ir/TestCompile/classes/merge.exp.json @@ -0,0 +1,1625 @@ +{ + "fields": [ + { + "name": "classes", + "composite": { + "fields": [ + { + "name": "mango", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/merge.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + }, + { + "name": "width", + "primary": { + "value": { + "range": "TestCompile/classes/merge.d2,3:9:54-3:11:56", + "raw": "10", + "value": "10" + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:7:52", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:7:52", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:7:52", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:11:56", + "key": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:7:52", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:7:52", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/classes/merge.d2,3:9:54-3:11:56", + "raw": "10", + "value": "10" + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge.d2,1:2:13-4:3:60", + "key": { + "range": "TestCompile/classes/merge.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge.d2,1:9:20-4:2:59", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:11:56", + "key": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:7:52", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:7:52", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/classes/merge.d2,3:9:54-3:11:56", + "raw": "10", + "value": "10" + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge.d2,0:0:0-5:1:62", + "key": { + "range": "TestCompile/classes/merge.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge.d2,0:9:9-5:0:61", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge.d2,1:2:13-4:3:60", + "key": { + "range": "TestCompile/classes/merge.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge.d2,1:9:20-4:2:59", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:11:56", + "key": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:7:52", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:7:52", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/classes/merge.d2,3:9:54-3:11:56", + "raw": "10", + "value": "10" + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + }, + { + "name": "layers", + "composite": { + "fields": [ + { + "name": "hawaii", + "composite": { + "fields": [ + { + "name": "classes", + "composite": { + "fields": [ + { + "name": "mango", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/merge.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + }, + { + "name": "width", + "primary": { + "value": { + "range": "TestCompile/classes/merge.d2,10:15:130-10:19:134", + "raw": "9000", + "value": "9000" + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:7:52", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:7:52", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:7:52", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:11:56", + "key": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:7:52", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:7:52", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/classes/merge.d2,3:9:54-3:11:56", + "raw": "10", + "value": "10" + } + } + } + } + }, + { + "string": { + "range": "TestCompile/classes/merge.d2,10:8:123-10:13:128", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge.d2,10:8:123-10:13:128", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,10:8:123-10:13:128", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge.d2,10:8:123-10:19:134", + "key": { + "range": "TestCompile/classes/merge.d2,10:8:123-10:13:128", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,10:8:123-10:13:128", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/classes/merge.d2,10:15:130-10:19:134", + "raw": "9000", + "value": "9000" + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge.d2,1:2:13-4:3:60", + "key": { + "range": "TestCompile/classes/merge.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge.d2,1:9:20-4:2:59", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:11:56", + "key": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:7:52", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:7:52", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/classes/merge.d2,3:9:54-3:11:56", + "raw": "10", + "value": "10" + } + } + } + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/classes/merge.d2,9:6:106-9:11:111", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge.d2,9:6:106-9:11:111", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,9:6:106-9:11:111", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge.d2,9:6:106-11:7:142", + "key": { + "range": "TestCompile/classes/merge.d2,9:6:106-9:11:111", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,9:6:106-9:11:111", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge.d2,9:13:113-11:6:141", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge.d2,10:8:123-10:19:134", + "key": { + "range": "TestCompile/classes/merge.d2,10:8:123-10:13:128", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,10:8:123-10:13:128", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/classes/merge.d2,10:15:130-10:19:134", + "raw": "9000", + "value": "9000" + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge.d2,0:0:0-5:1:62", + "key": { + "range": "TestCompile/classes/merge.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge.d2,0:9:9-5:0:61", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge.d2,1:2:13-4:3:60", + "key": { + "range": "TestCompile/classes/merge.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge.d2,1:9:20-4:2:59", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:11:56", + "key": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:7:52", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,3:2:47-3:7:52", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/classes/merge.d2,3:9:54-3:11:56", + "raw": "10", + "value": "10" + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge.d2,7:2:75-7:8:81", + "value": [ + { + "string": "hawaii", + "raw_string": "hawaii" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge.d2,7:2:75-7:8:81", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,7:2:75-7:8:81", + "value": [ + { + "string": "hawaii", + "raw_string": "hawaii" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge.d2,7:2:75-13:3:152", + "key": { + "range": "TestCompile/classes/merge.d2,7:2:75-7:8:81", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,7:2:75-7:8:81", + "value": [ + { + "string": "hawaii", + "raw_string": "hawaii" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge.d2,7:10:83-13:2:151", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge.d2,8:4:89-12:5:148", + "key": { + "range": "TestCompile/classes/merge.d2,8:4:89-8:11:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,8:4:89-8:11:96", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge.d2,8:13:98-12:4:147", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge.d2,9:6:106-11:7:142", + "key": { + "range": "TestCompile/classes/merge.d2,9:6:106-9:11:111", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,9:6:106-9:11:111", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge.d2,9:13:113-11:6:141", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge.d2,10:8:123-10:19:134", + "key": { + "range": "TestCompile/classes/merge.d2,10:8:123-10:13:128", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,10:8:123-10:13:128", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/classes/merge.d2,10:15:130-10:19:134", + "raw": "9000", + "value": "9000" + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/merge.d2,6:0:63-6:6:69", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/merge.d2,6:0:63-6:6:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,6:0:63-6:6:69", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/merge.d2,6:0:63-14:1:154", + "key": { + "range": "TestCompile/classes/merge.d2,6:0:63-6:6:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,6:0:63-6:6:69", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge.d2,6:8:71-14:0:153", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge.d2,7:2:75-13:3:152", + "key": { + "range": "TestCompile/classes/merge.d2,7:2:75-7:8:81", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,7:2:75-7:8:81", + "value": [ + { + "string": "hawaii", + "raw_string": "hawaii" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge.d2,7:10:83-13:2:151", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge.d2,8:4:89-12:5:148", + "key": { + "range": "TestCompile/classes/merge.d2,8:4:89-8:11:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,8:4:89-8:11:96", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge.d2,8:13:98-12:4:147", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge.d2,9:6:106-11:7:142", + "key": { + "range": "TestCompile/classes/merge.d2,9:6:106-9:11:111", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,9:6:106-9:11:111", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/merge.d2,9:13:113-11:6:141", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/merge.d2,10:8:123-10:19:134", + "key": { + "range": "TestCompile/classes/merge.d2,10:8:123-10:13:128", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/merge.d2,10:8:123-10:13:128", + "value": [ + { + "string": "width", + "raw_string": "width" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/classes/merge.d2,10:15:130-10:19:134", + "raw": "9000", + "value": "9000" + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/classes/nested.exp.json b/testdata/d2ir/TestCompile/classes/nested.exp.json new file mode 100644 index 000000000..576dc9642 --- /dev/null +++ b/testdata/d2ir/TestCompile/classes/nested.exp.json @@ -0,0 +1,1924 @@ +{ + "fields": [ + { + "name": "classes", + "composite": { + "fields": [ + { + "name": "mango", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/nested.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/nested.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/nested.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nested.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nested.d2,1:2:13-3:3:48", + "key": { + "range": "TestCompile/classes/nested.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nested.d2,1:9:20-3:2:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/nested.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nested.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nested.d2,0:0:0-4:1:50", + "key": { + "range": "TestCompile/classes/nested.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nested.d2,0:9:9-4:0:49", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nested.d2,1:2:13-3:3:48", + "key": { + "range": "TestCompile/classes/nested.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nested.d2,1:9:20-3:2:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + }, + { + "name": "layers", + "composite": { + "fields": [ + { + "name": "hawaii", + "composite": { + "fields": [ + { + "name": "layers", + "composite": { + "fields": [ + { + "name": "maui", + "composite": { + "fields": [ + { + "name": "x", + "references": [ + { + "string": { + "range": "TestCompile/classes/nested.d2,9:8:107-9:9:108", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nested.d2,9:8:107-9:9:108", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,9:8:107-9:9:108", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nested.d2,9:8:107-9:9:108", + "key": { + "range": "TestCompile/classes/nested.d2,9:8:107-9:9:108", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,9:8:107-9:9:108", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "classes", + "composite": { + "fields": [ + { + "name": "mango", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/nested.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/nested.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/nested.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nested.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nested.d2,1:2:13-3:3:48", + "key": { + "range": "TestCompile/classes/nested.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nested.d2,1:9:20-3:2:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/nested.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nested.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nested.d2,0:0:0-4:1:50", + "key": { + "range": "TestCompile/classes/nested.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nested.d2,0:9:9-4:0:49", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nested.d2,1:2:13-3:3:48", + "key": { + "range": "TestCompile/classes/nested.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nested.d2,1:9:20-3:2:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/nested.d2,8:6:91-8:10:95", + "value": [ + { + "string": "maui", + "raw_string": "maui" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nested.d2,8:6:91-8:10:95", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,8:6:91-8:10:95", + "value": [ + { + "string": "maui", + "raw_string": "maui" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nested.d2,8:6:91-10:7:116", + "key": { + "range": "TestCompile/classes/nested.d2,8:6:91-8:10:95", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,8:6:91-8:10:95", + "value": [ + { + "string": "maui", + "raw_string": "maui" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nested.d2,8:12:97-10:6:115", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nested.d2,9:8:107-9:9:108", + "key": { + "range": "TestCompile/classes/nested.d2,9:8:107-9:9:108", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,9:8:107-9:9:108", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/nested.d2,7:2:75-7:8:81", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nested.d2,7:2:75-7:8:81", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,7:2:75-7:8:81", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nested.d2,7:2:75-11:5:122", + "key": { + "range": "TestCompile/classes/nested.d2,7:2:75-7:8:81", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,7:2:75-7:8:81", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nested.d2,7:10:83-11:4:121", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nested.d2,8:6:91-10:7:116", + "key": { + "range": "TestCompile/classes/nested.d2,8:6:91-8:10:95", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,8:6:91-8:10:95", + "value": [ + { + "string": "maui", + "raw_string": "maui" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nested.d2,8:12:97-10:6:115", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nested.d2,9:8:107-9:9:108", + "key": { + "range": "TestCompile/classes/nested.d2,9:8:107-9:9:108", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,9:8:107-9:9:108", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + }, + { + "name": "classes", + "composite": { + "fields": [ + { + "name": "mango", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/nested.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/nested.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/nested.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nested.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nested.d2,1:2:13-3:3:48", + "key": { + "range": "TestCompile/classes/nested.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nested.d2,1:9:20-3:2:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/nested.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nested.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nested.d2,0:0:0-4:1:50", + "key": { + "range": "TestCompile/classes/nested.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nested.d2,0:9:9-4:0:49", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nested.d2,1:2:13-3:3:48", + "key": { + "range": "TestCompile/classes/nested.d2,1:2:13-1:7:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,1:2:13-1:7:18", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nested.d2,1:9:20-3:2:47", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:22:44", + "key": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:14:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:4:26-2:9:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:10:32-2:14:36", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,2:16:38-2:22:44", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/nested.d2,6:2:63-6:8:69", + "value": [ + { + "string": "hawaii", + "raw_string": "hawaii" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nested.d2,6:2:63-6:8:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,6:2:63-6:8:69", + "value": [ + { + "string": "hawaii", + "raw_string": "hawaii" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nested.d2,6:2:63-12:3:126", + "key": { + "range": "TestCompile/classes/nested.d2,6:2:63-6:8:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,6:2:63-6:8:69", + "value": [ + { + "string": "hawaii", + "raw_string": "hawaii" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nested.d2,6:10:71-12:2:125", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nested.d2,7:2:75-11:5:122", + "key": { + "range": "TestCompile/classes/nested.d2,7:2:75-7:8:81", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,7:2:75-7:8:81", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nested.d2,7:10:83-11:4:121", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nested.d2,8:6:91-10:7:116", + "key": { + "range": "TestCompile/classes/nested.d2,8:6:91-8:10:95", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,8:6:91-8:10:95", + "value": [ + { + "string": "maui", + "raw_string": "maui" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nested.d2,8:12:97-10:6:115", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nested.d2,9:8:107-9:9:108", + "key": { + "range": "TestCompile/classes/nested.d2,9:8:107-9:9:108", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,9:8:107-9:9:108", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/nested.d2,5:0:51-5:6:57", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nested.d2,5:0:51-5:6:57", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,5:0:51-5:6:57", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nested.d2,5:0:51-13:1:128", + "key": { + "range": "TestCompile/classes/nested.d2,5:0:51-5:6:57", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,5:0:51-5:6:57", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nested.d2,5:8:59-13:0:127", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nested.d2,6:2:63-12:3:126", + "key": { + "range": "TestCompile/classes/nested.d2,6:2:63-6:8:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,6:2:63-6:8:69", + "value": [ + { + "string": "hawaii", + "raw_string": "hawaii" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nested.d2,6:10:71-12:2:125", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nested.d2,7:2:75-11:5:122", + "key": { + "range": "TestCompile/classes/nested.d2,7:2:75-7:8:81", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,7:2:75-7:8:81", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nested.d2,7:10:83-11:4:121", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nested.d2,8:6:91-10:7:116", + "key": { + "range": "TestCompile/classes/nested.d2,8:6:91-8:10:95", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,8:6:91-8:10:95", + "value": [ + { + "string": "maui", + "raw_string": "maui" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nested.d2,8:12:97-10:6:115", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nested.d2,9:8:107-9:9:108", + "key": { + "range": "TestCompile/classes/nested.d2,9:8:107-9:9:108", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nested.d2,9:8:107-9:9:108", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/classes/nonroot-class.exp.json b/testdata/d2ir/TestCompile/classes/nonroot-class.exp.json new file mode 100644 index 000000000..7569a2187 --- /dev/null +++ b/testdata/d2ir/TestCompile/classes/nonroot-class.exp.json @@ -0,0 +1,617 @@ +{ + "fields": [ + { + "name": "x", + "composite": { + "fields": [ + { + "name": "classes", + "composite": { + "fields": [ + { + "name": "mango", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/classes/nonroot-class.d2,3:18:49-3:24:55", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/nonroot-class.d2,3:12:43-3:16:47", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:16:47", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:11:42", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,3:12:43-3:16:47", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:24:55", + "key": { + "range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:16:47", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:11:42", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,3:12:43-3:16:47", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,3:18:49-3:24:55", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:11:42", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:16:47", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:11:42", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,3:12:43-3:16:47", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:24:55", + "key": { + "range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:16:47", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:11:42", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,3:12:43-3:16:47", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,3:18:49-3:24:55", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/nonroot-class.d2,2:4:22-2:9:27", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nonroot-class.d2,2:4:22-2:9:27", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,2:4:22-2:9:27", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nonroot-class.d2,2:4:22-4:5:61", + "key": { + "range": "TestCompile/classes/nonroot-class.d2,2:4:22-2:9:27", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,2:4:22-2:9:27", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nonroot-class.d2,2:11:29-4:4:60", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:24:55", + "key": { + "range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:16:47", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:11:42", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,3:12:43-3:16:47", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,3:18:49-3:24:55", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/nonroot-class.d2,1:2:7-1:9:14", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nonroot-class.d2,1:2:7-1:9:14", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,1:2:7-1:9:14", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nonroot-class.d2,1:2:7-5:3:65", + "key": { + "range": "TestCompile/classes/nonroot-class.d2,1:2:7-1:9:14", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,1:2:7-1:9:14", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nonroot-class.d2,1:11:16-5:2:64", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nonroot-class.d2,2:4:22-4:5:61", + "key": { + "range": "TestCompile/classes/nonroot-class.d2,2:4:22-2:9:27", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,2:4:22-2:9:27", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nonroot-class.d2,2:11:29-4:4:60", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:24:55", + "key": { + "range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:16:47", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:11:42", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,3:12:43-3:16:47", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,3:18:49-3:24:55", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/classes/nonroot-class.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/classes/nonroot-class.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/classes/nonroot-class.d2,0:0:0-6:1:67", + "key": { + "range": "TestCompile/classes/nonroot-class.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nonroot-class.d2,0:3:3-6:0:66", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nonroot-class.d2,1:2:7-5:3:65", + "key": { + "range": "TestCompile/classes/nonroot-class.d2,1:2:7-1:9:14", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,1:2:7-1:9:14", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nonroot-class.d2,1:11:16-5:2:64", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nonroot-class.d2,2:4:22-4:5:61", + "key": { + "range": "TestCompile/classes/nonroot-class.d2,2:4:22-2:9:27", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,2:4:22-2:9:27", + "value": [ + { + "string": "mango", + "raw_string": "mango" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/classes/nonroot-class.d2,2:11:29-4:4:60", + "nodes": [ + { + "map_key": { + "range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:24:55", + "key": { + "range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:16:47", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:11:42", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,3:12:43-3:16:47", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/classes/nonroot-class.d2,3:18:49-3:24:55", + "value": [ + { + "string": "orange", + "raw_string": "orange" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null +}