diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index b7032e194..4a15bc469 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -9,6 +9,7 @@ Layout capability also takes a subtle but important step forward: you can now cu - Scale renders and disable fit to screen with `--scale` flag [#1413](https://github.com/terrastruct/d2/pull/1413) - `null` keyword can be used to un-declare. See [docs](https://d2lang.com/tour/overrides#null) [#1446](https://github.com/terrastruct/d2/pull/1446) - Develop multi-board diagrams in watch mode (links to layers/scenarios/steps work in `--watch`) [#1503](https://github.com/terrastruct/d2/pull/1503) +- Glob patterns have been implemented. See [docs](https://d2lang.com/tour/globs). [#1479](https://github.com/terrastruct/d2/pull/1479) #### Improvements 🧹 diff --git a/d2ast/d2ast.go b/d2ast/d2ast.go index 6313dbe0d..6b6f47389 100644 --- a/d2ast/d2ast.go +++ b/d2ast/d2ast.go @@ -500,6 +500,8 @@ type Number struct { type UnquotedString struct { Range Range `json:"range"` Value []InterpolationBox `json:"value"` + // Pattern holds the parsed glob pattern if in a key and the unquoted string represents a valid pattern. + Pattern []string `json:"pattern,omitempty"` } func (s *UnquotedString) Coalesce() { @@ -738,6 +740,31 @@ func (kp *KeyPath) IDA() (ida []string) { return ida } +func (kp *KeyPath) Copy() *KeyPath { + kp2 := *kp + kp2.Path = nil + kp2.Path = append(kp2.Path, kp.Path...) + return &kp2 +} + +func (kp *KeyPath) HasDoubleGlob() bool { + for _, el := range kp.Path { + if el.UnquotedString != nil && el.ScalarString() == "**" { + return true + } + } + return false +} + +func (kp *KeyPath) HasGlob() bool { + for _, el := range kp.Path { + if el.UnquotedString != nil && len(el.UnquotedString.Pattern) > 0 { + return true + } + } + return false +} + type Edge struct { Range Range `json:"range"` @@ -1056,6 +1083,10 @@ func (sb *StringBox) Unbox() String { } } +func (sb *StringBox) ScalarString() string { + return sb.Unbox().ScalarString() +} + // InterpolationBox is used to select between strings and substitutions in unquoted and // double quoted strings. There is no corresponding interface to avoid unnecessary // abstraction. diff --git a/d2ir/compile.go b/d2ir/compile.go index 66eb97818..43763139d 100644 --- a/d2ir/compile.go +++ b/d2ir/compile.go @@ -396,20 +396,27 @@ func (c *compiler) compileKey(refctx *RefContext) { } func (c *compiler) compileField(dst *Map, kp *d2ast.KeyPath, refctx *RefContext) { - if refctx.Key != nil && len(refctx.Key.Edges) == 0 && refctx.Key.Value.Null != nil { - // For vars, if we delete the field, it may just resolve to an outer scope var of the same name - // Instead we keep it around, so that resolveSubstitutions can find it - if !IsVar(dst) { - dst.DeleteField(kp.IDA()...) - return - } - } - f, err := dst.EnsureField(kp, refctx) + fa, err := dst.EnsureField(kp, refctx, true) if err != nil { c.err.Errors = append(c.err.Errors, err.(d2ast.Error)) return } + for _, f := range fa { + c._compileField(f, refctx) + } +} + +func (c *compiler) _compileField(f *Field, refctx *RefContext) { + if len(refctx.Key.Edges) == 0 && refctx.Key.Value.Null != nil { + // For vars, if we delete the field, it may just resolve to an outer scope var of the same name + // Instead we keep it around, so that resolveSubstitutions can find it + if !IsVar(ParentMap(f)) { + ParentMap(f).DeleteField(f.Name) + return + } + } + if refctx.Key.Primary.Unbox() != nil { f.Primary_ = &Scalar{ parent: f, @@ -602,12 +609,17 @@ func (c *compiler) compileLink(refctx *RefContext) { } func (c *compiler) compileEdges(refctx *RefContext) { - if refctx.Key.Key != nil { - f, err := refctx.ScopeMap.EnsureField(refctx.Key.Key, refctx) - if err != nil { - c.err.Errors = append(c.err.Errors, err.(d2ast.Error)) - return - } + if refctx.Key.Key == nil { + c._compileEdges(refctx) + return + } + + fa, err := refctx.ScopeMap.EnsureField(refctx.Key.Key, refctx, true) + if err != nil { + c.err.Errors = append(c.err.Errors, err.(d2ast.Error)) + return + } + for _, f := range fa { if _, ok := f.Composite.(*Array); ok { c.errorf(refctx.Key.Key, "cannot index into array") return @@ -617,9 +629,13 @@ func (c *compiler) compileEdges(refctx *RefContext) { parent: f, } } - refctx.ScopeMap = f.Map() + refctx2 := *refctx + refctx2.ScopeMap = f.Map() + c._compileEdges(&refctx2) } +} +func (c *compiler) _compileEdges(refctx *RefContext) { eida := NewEdgeIDs(refctx.Key) for i, eid := range eida { if refctx.Key != nil && refctx.Key.Value.Null != nil { @@ -630,66 +646,59 @@ func (c *compiler) compileEdges(refctx *RefContext) { refctx = refctx.Copy() refctx.Edge = refctx.Key.Edges[i] - var e *Edge - if eid.Index != nil { - ea := refctx.ScopeMap.GetEdges(eid) + var ea []*Edge + if eid.Index != nil || eid.Glob { + ea = refctx.ScopeMap.GetEdges(eid, refctx) if len(ea) == 0 { c.errorf(refctx.Edge, "indexed edge does not exist") continue } - e = ea[0] - e.References = append(e.References, &EdgeReference{ - Context: refctx, - }) - refctx.ScopeMap.appendFieldReferences(0, refctx.Edge.Src, refctx) - refctx.ScopeMap.appendFieldReferences(0, refctx.Edge.Dst, refctx) + for _, e := range ea { + e.References = append(e.References, &EdgeReference{ + Context: refctx, + }) + refctx.ScopeMap.appendFieldReferences(0, refctx.Edge.Src, refctx) + refctx.ScopeMap.appendFieldReferences(0, refctx.Edge.Dst, refctx) + } } else { - _, err := refctx.ScopeMap.EnsureField(refctx.Edge.Src, refctx) - if err != nil { - c.err.Errors = append(c.err.Errors, err.(d2ast.Error)) - continue - } - _, err = refctx.ScopeMap.EnsureField(refctx.Edge.Dst, refctx) - if err != nil { - c.err.Errors = append(c.err.Errors, err.(d2ast.Error)) - continue - } - - e, err = refctx.ScopeMap.CreateEdge(eid, refctx) + var err error + ea, err = refctx.ScopeMap.CreateEdge(eid, refctx) if err != nil { c.err.Errors = append(c.err.Errors, err.(d2ast.Error)) continue } } - if refctx.Key.EdgeKey != nil { - if e.Map_ == nil { - e.Map_ = &Map{ - parent: e, - } - } - c.compileField(e.Map_, refctx.Key.EdgeKey, refctx) - } else { - if refctx.Key.Primary.Unbox() != nil { - e.Primary_ = &Scalar{ - parent: e, - Value: refctx.Key.Primary.Unbox(), - } - } - if refctx.Key.Value.Array != nil { - c.errorf(refctx.Key.Value.Unbox(), "edges cannot be assigned arrays") - continue - } else if refctx.Key.Value.Map != nil { + for _, e := range ea { + if refctx.Key.EdgeKey != nil { if e.Map_ == nil { e.Map_ = &Map{ parent: e, } } - c.compileMap(e.Map_, refctx.Key.Value.Map, refctx.ScopeAST) - } else if refctx.Key.Value.ScalarBox().Unbox() != nil { - e.Primary_ = &Scalar{ - parent: e, - Value: refctx.Key.Value.ScalarBox().Unbox(), + c.compileField(e.Map_, refctx.Key.EdgeKey, refctx) + } else { + if refctx.Key.Primary.Unbox() != nil { + e.Primary_ = &Scalar{ + parent: e, + Value: refctx.Key.Primary.Unbox(), + } + } + if refctx.Key.Value.Array != nil { + c.errorf(refctx.Key.Value.Unbox(), "edges cannot be assigned arrays") + continue + } else if refctx.Key.Value.Map != nil { + if e.Map_ == nil { + e.Map_ = &Map{ + parent: e, + } + } + c.compileMap(e.Map_, refctx.Key.Value.Map, refctx.ScopeAST) + } else if refctx.Key.Value.ScalarBox().Unbox() != nil { + e.Primary_ = &Scalar{ + parent: e, + Value: refctx.Key.Value.ScalarBox().Unbox(), + } } } } diff --git a/d2ir/compile_test.go b/d2ir/compile_test.go index ab7173c8e..64d16ad8d 100644 --- a/d2ir/compile_test.go +++ b/d2ir/compile_test.go @@ -26,6 +26,7 @@ func TestCompile(t *testing.T) { t.Run("scenarios", testCompileScenarios) t.Run("steps", testCompileSteps) t.Run("imports", testCompileImports) + t.Run("patterns", testCompilePatterns) } type testCase struct { @@ -84,23 +85,31 @@ func assertQuery(t testing.TB, n d2ir.Node, nfields, nedges int, primary interfa m := n.Map() p := n.Primary() + var na []d2ir.Node if idStr != "" { var err error - n, err = m.Query(idStr) + na, err = m.QueryAll(idStr) assert.Success(t, err) assert.NotEqual(t, n, nil) + } else { + na = append(na, n) + } - p = n.Primary() + for _, n := range na { m = n.Map() + p = n.Primary() + assert.Equal(t, nfields, m.FieldCountRecursive()) + assert.Equal(t, nedges, m.EdgeCountRecursive()) + if !makeScalar(p).Equal(makeScalar(primary)) { + t.Fatalf("expected primary %#v but got %s", primary, p) + } } - assert.Equal(t, nfields, m.FieldCountRecursive()) - assert.Equal(t, nedges, m.EdgeCountRecursive()) - if !makeScalar(p).Equal(makeScalar(primary)) { - t.Fatalf("expected primary %#v but got %s", primary, p) + if len(na) == 0 { + return nil } - return n + return na[0] } func makeScalar(v interface{}) *d2ir.Scalar { diff --git a/d2ir/d2ir.go b/d2ir/d2ir.go index 1160021f4..4550a9857 100644 --- a/d2ir/d2ir.go +++ b/d2ir/d2ir.go @@ -325,6 +325,7 @@ type EdgeID struct { // If nil, then any EdgeID with equal src/dst/arrows matches. Index *int `json:"index"` + Glob bool `json:"glob"` } func NewEdgeIDs(k *d2ast.Key) (eida []*EdgeID) { @@ -337,6 +338,7 @@ func NewEdgeIDs(k *d2ast.Key) (eida []*EdgeID) { } if k.EdgeIndex != nil { eid.Index = k.EdgeIndex.Int + eid.Glob = k.EdgeIndex.Glob } eida = append(eida, eid) } @@ -585,6 +587,19 @@ func (m *Map) FieldCountRecursive() int { return acc } +func (m *Map) IsContainer() bool { + if m == nil { + return false + } + for _, f := range m.Fields { + _, isReserved := d2graph.ReservedKeywords[f.Name] + if !isReserved { + return true + } + } + return false +} + func (m *Map) EdgeCountRecursive() int { if m == nil { return 0 @@ -651,7 +666,8 @@ func (m *Map) getField(ida []string) *Field { return nil } -func (m *Map) EnsureField(kp *d2ast.KeyPath, refctx *RefContext) (*Field, error) { +// EnsureField is a bit of a misnomer. It's more of a Query/Ensure combination function at this point. +func (m *Map) EnsureField(kp *d2ast.KeyPath, refctx *RefContext, create bool) ([]*Field, error) { i := 0 for kp.Path[i].Unbox().ScalarString() == "_" { m = ParentMap(m) @@ -663,29 +679,73 @@ func (m *Map) EnsureField(kp *d2ast.KeyPath, refctx *RefContext) (*Field, error) } i++ } - return m.ensureField(i, kp, refctx) + + var fa []*Field + err := m.ensureField(i, kp, refctx, create, &fa) + return fa, err } -func (m *Map) ensureField(i int, kp *d2ast.KeyPath, refctx *RefContext) (*Field, error) { +func (m *Map) ensureField(i int, kp *d2ast.KeyPath, refctx *RefContext, create bool, fa *[]*Field) error { + us, ok := kp.Path[i].Unbox().(*d2ast.UnquotedString) + if ok && us.Pattern != nil { + fa2, ok := m.doubleGlob(us.Pattern) + if ok { + if i == len(kp.Path)-1 { + *fa = append(*fa, fa2...) + } else { + for _, f := range fa2 { + if f.Map() == nil { + f.Composite = &Map{ + parent: f, + } + } + err := f.Map().ensureField(i+1, kp, refctx, create, fa) + if err != nil { + return err + } + } + } + return nil + } + for _, f := range m.Fields { + if matchPattern(f.Name, us.Pattern) { + if i == len(kp.Path)-1 { + *fa = append(*fa, f) + } else { + if f.Map() == nil { + f.Composite = &Map{ + parent: f, + } + } + err := f.Map().ensureField(i+1, kp, refctx, create, fa) + if err != nil { + return err + } + } + } + } + return nil + } + head := kp.Path[i].Unbox().ScalarString() if _, ok := d2graph.ReservedKeywords[strings.ToLower(head)]; ok { head = strings.ToLower(head) if _, ok := d2graph.CompositeReservedKeywords[head]; !ok && i < len(kp.Path)-1 { - return nil, d2parser.Errorf(kp.Path[i].Unbox(), fmt.Sprintf(`"%s" must be the last part of the key`, head)) + return d2parser.Errorf(kp.Path[i].Unbox(), fmt.Sprintf(`"%s" must be the last part of the key`, head)) } } if head == "_" { - return nil, d2parser.Errorf(kp.Path[i].Unbox(), `parent "_" can only be used in the beginning of paths, e.g. "_.x"`) + return 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) + return 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) + return d2parser.Errorf(kp.Path[i].Unbox(), "%s is only allowed at a board root", head) } for _, f := range m.Fields { @@ -703,19 +763,23 @@ func (m *Map) ensureField(i int, kp *d2ast.KeyPath, refctx *RefContext) (*Field, } if i+1 == len(kp.Path) { - return f, nil + *fa = append(*fa, f) + return nil } if _, ok := f.Composite.(*Array); ok { - return nil, d2parser.Errorf(kp.Path[i].Unbox(), "cannot index into array") + return d2parser.Errorf(kp.Path[i].Unbox(), "cannot index into array") } if f.Map() == nil { f.Composite = &Map{ parent: f, } } - return f.Map().ensureField(i+1, kp, refctx) + return f.Map().ensureField(i+1, kp, refctx, create, fa) } + if !create { + return nil + } f := &Field{ parent: m, Name: head, @@ -730,12 +794,13 @@ func (m *Map) ensureField(i int, kp *d2ast.KeyPath, refctx *RefContext) (*Field, } m.Fields = append(m.Fields, f) if i+1 == len(kp.Path) { - return f, nil + *fa = append(*fa, f) + return nil } f.Composite = &Map{ parent: f, } - return f.Map().ensureField(i+1, kp, refctx) + return f.Map().ensureField(i+1, kp, refctx, create, fa) } func (m *Map) DeleteEdge(eid *EdgeID) *Edge { @@ -800,7 +865,13 @@ func (m *Map) DeleteField(ida ...string) *Field { return nil } -func (m *Map) GetEdges(eid *EdgeID) []*Edge { +func (m *Map) GetEdges(eid *EdgeID, refctx *RefContext) []*Edge { + if refctx != nil { + var ea []*Edge + m.getEdges(eid, refctx, &ea) + return ea + } + eid, m, common, err := eid.resolve(m) if err != nil { return nil @@ -811,7 +882,7 @@ func (m *Map) GetEdges(eid *EdgeID) []*Edge { return nil } if f.Map() != nil { - return f.Map().GetEdges(eid) + return f.Map().GetEdges(eid, nil) } return nil } @@ -825,65 +896,197 @@ func (m *Map) GetEdges(eid *EdgeID) []*Edge { return ea } -func (m *Map) CreateEdge(eid *EdgeID, refctx *RefContext) (*Edge, error) { +func (m *Map) getEdges(eid *EdgeID, refctx *RefContext, ea *[]*Edge) error { + eid, m, common, err := eid.resolve(m) + if err != nil { + return err + } + + if len(common) > 0 { + commonKP := d2ast.MakeKeyPath(common) + lastMatch := 0 + for i, el := range commonKP.Path { + for j := lastMatch; j < len(refctx.Edge.Src.Path); j++ { + realEl := refctx.Edge.Src.Path[j] + if el.ScalarString() == realEl.ScalarString() { + commonKP.Path[i] = realEl + lastMatch += j + 1 + } + } + } + fa, err := m.EnsureField(commonKP, nil, false) + if err != nil { + return nil + } + for _, f := range fa { + if _, ok := f.Composite.(*Array); ok { + return d2parser.Errorf(refctx.Edge.Src, "cannot index into array") + } + if f.Map() == nil { + f.Composite = &Map{ + parent: f, + } + } + err = f.Map().getEdges(eid, refctx, ea) + if err != nil { + return err + } + } + return nil + } + + srcFA, err := refctx.ScopeMap.EnsureField(refctx.Edge.Src, nil, false) + if err != nil { + return err + } + dstFA, err := refctx.ScopeMap.EnsureField(refctx.Edge.Dst, nil, false) + if err != nil { + return err + } + + for _, src := range srcFA { + for _, dst := range dstFA { + eid2 := eid.Copy() + eid2.SrcPath = RelIDA(m, src) + eid2.DstPath = RelIDA(m, dst) + + ea2 := m.GetEdges(eid2, nil) + *ea = append(*ea, ea2...) + } + } + return nil +} + +func (m *Map) CreateEdge(eid *EdgeID, refctx *RefContext) ([]*Edge, error) { + var ea []*Edge + return ea, m.createEdge(eid, refctx, &ea) +} + +func (m *Map) createEdge(eid *EdgeID, refctx *RefContext, ea *[]*Edge) error { if ParentEdge(m) != nil { - return nil, d2parser.Errorf(refctx.Edge, "cannot create edge inside edge") + return d2parser.Errorf(refctx.Edge, "cannot create edge inside edge") } eid, m, common, err := eid.resolve(m) if err != nil { - return nil, d2parser.Errorf(refctx.Edge, err.Error()) + return d2parser.Errorf(refctx.Edge, err.Error()) } if len(common) > 0 { - f, err := m.EnsureField(d2ast.MakeKeyPath(common), nil) - if err != nil { - return nil, err - } - if _, ok := f.Composite.(*Array); ok { - return nil, d2parser.Errorf(refctx.Edge.Src, "cannot index into array") - } - if f.Map() == nil { - f.Composite = &Map{ - parent: f, + commonKP := d2ast.MakeKeyPath(common) + lastMatch := 0 + for i, el := range commonKP.Path { + for j := lastMatch; j < len(refctx.Edge.Src.Path); j++ { + realEl := refctx.Edge.Src.Path[j] + if el.ScalarString() == realEl.ScalarString() { + commonKP.Path[i] = realEl + lastMatch += j + 1 + } } } - return f.Map().CreateEdge(eid, refctx) + fa, err := m.EnsureField(commonKP, nil, true) + if err != nil { + return err + } + for _, f := range fa { + if _, ok := f.Composite.(*Array); ok { + return d2parser.Errorf(refctx.Edge.Src, "cannot index into array") + } + if f.Map() == nil { + f.Composite = &Map{ + parent: f, + } + } + err = f.Map().createEdge(eid, refctx, ea) + if err != nil { + return err + } + } + return nil } ij := findProhibitedEdgeKeyword(eid.SrcPath...) if ij != -1 { - return nil, d2parser.Errorf(refctx.Edge.Src.Path[ij].Unbox(), "reserved keywords are prohibited in edges") + return d2parser.Errorf(refctx.Edge.Src.Path[ij].Unbox(), "reserved keywords are prohibited in edges") } ij = findBoardKeyword(eid.SrcPath...) if ij == len(eid.SrcPath)-1 { - return nil, d2parser.Errorf(refctx.Edge.Src.Path[ij].Unbox(), "edge with board keyword alone doesn't make sense") - } - src := m.GetField(eid.SrcPath...) - if NodeBoardKind(src) != "" { - return nil, d2parser.Errorf(refctx.Edge.Src, "cannot create edges between boards") + return d2parser.Errorf(refctx.Edge.Src.Path[ij].Unbox(), "edge with board keyword alone doesn't make sense") } ij = findProhibitedEdgeKeyword(eid.DstPath...) if ij != -1 { - return nil, d2parser.Errorf(refctx.Edge.Dst.Path[ij].Unbox(), "reserved keywords are prohibited in edges") + return d2parser.Errorf(refctx.Edge.Dst.Path[ij].Unbox(), "reserved keywords are prohibited in edges") } ij = findBoardKeyword(eid.DstPath...) if ij == len(eid.DstPath)-1 { - return nil, d2parser.Errorf(refctx.Edge.Dst.Path[ij].Unbox(), "edge with board keyword alone doesn't make sense") + return d2parser.Errorf(refctx.Edge.Dst.Path[ij].Unbox(), "edge with board keyword alone doesn't make sense") + } + + srcFA, err := refctx.ScopeMap.EnsureField(refctx.Edge.Src, refctx, true) + if err != nil { + return err + } + dstFA, err := refctx.ScopeMap.EnsureField(refctx.Edge.Dst, refctx, true) + if err != nil { + return err + } + + for _, src := range srcFA { + for _, dst := range dstFA { + if src == dst && (refctx.Edge.Src.HasGlob() || refctx.Edge.Dst.HasGlob()) { + // Globs do not make self edges. + continue + } + + if refctx.Edge.Src.HasDoubleGlob() { + // If src has a double glob we only select leafs, those without children. + if src.Map().IsContainer() { + continue + } + if ParentBoard(src) != ParentBoard(dst) { + continue + } + } + if refctx.Edge.Dst.HasDoubleGlob() { + // If dst has a double glob we only select leafs, those without children. + if dst.Map().IsContainer() { + continue + } + if ParentBoard(src) != ParentBoard(dst) { + continue + } + } + + eid2 := eid.Copy() + eid2.SrcPath = RelIDA(m, src) + eid2.DstPath = RelIDA(m, dst) + e, err := m.createEdge2(eid2, refctx, src, dst) + if err != nil { + return err + } + *ea = append(*ea, e) + } + } + return nil +} + +func (m *Map) createEdge2(eid *EdgeID, refctx *RefContext, src, dst *Field) (*Edge, error) { + if NodeBoardKind(src) != "" { + return nil, d2parser.Errorf(refctx.Edge.Src, "cannot create edges between boards") } - dst := m.GetField(eid.DstPath...) if NodeBoardKind(dst) != "" { return nil, d2parser.Errorf(refctx.Edge.Dst, "cannot create edges between boards") } - if ParentBoard(src) != ParentBoard(dst) { return nil, d2parser.Errorf(refctx.Edge, "cannot create edges between boards") } eid.Index = nil - ea := m.GetEdges(eid) + eid.Glob = true + ea := m.GetEdges(eid, nil) index := len(ea) eid.Index = &index + eid.Glob = false e := &Edge{ parent: m, ID: eid, @@ -1159,6 +1362,26 @@ func IDA(n Node) (ida []string) { } } +// RelIDA returns the path to n relative to p. +func RelIDA(p, n Node) (ida []string) { + for { + f, ok := n.(*Field) + if ok { + ida = append(ida, f.Name) + if f.Root() { + reverseIDA(ida) + return ida + } + } + f = ParentField(n) + if f == nil || f.Root() || f == p || f.Composite == p { + reverseIDA(ida) + return ida + } + n = f + } +} + func reverseIDA(ida []string) { for i := 0; i < len(ida)/2; i++ { tmp := ida[i] diff --git a/d2ir/merge.go b/d2ir/merge.go index 15ba2a9ec..a4a30d21f 100644 --- a/d2ir/merge.go +++ b/d2ir/merge.go @@ -11,7 +11,7 @@ func OverlayMap(base, overlay *Map) { } for _, oe := range overlay.Edges { - bea := base.GetEdges(oe.ID) + bea := base.GetEdges(oe.ID, nil) if len(bea) == 0 { base.Edges = append(base.Edges, oe.Copy(base).(*Edge)) continue diff --git a/d2ir/pattern.go b/d2ir/pattern.go new file mode 100644 index 000000000..9409e0363 --- /dev/null +++ b/d2ir/pattern.go @@ -0,0 +1,59 @@ +package d2ir + +import ( + "strings" + + "oss.terrastruct.com/d2/d2graph" +) + +func (m *Map) doubleGlob(pattern []string) ([]*Field, bool) { + if !(len(pattern) == 3 && pattern[0] == "*" && pattern[1] == "" && pattern[2] == "*") { + return nil, false + } + var fa []*Field + m._doubleGlob(&fa) + return fa, true +} + +func (m *Map) _doubleGlob(fa *[]*Field) { + for _, f := range m.Fields { + if _, ok := d2graph.ReservedKeywords[f.Name]; ok { + if _, ok := d2graph.BoardKeywords[f.Name]; !ok { + continue + } + } + *fa = append(*fa, f) + if f.Map() != nil { + f.Map()._doubleGlob(fa) + } + } +} + +func matchPattern(s string, pattern []string) bool { + if len(pattern) == 0 { + return true + } + if _, ok := d2graph.ReservedKeywords[s]; ok { + return false + } + + for i := 0; i < len(pattern); i++ { + if pattern[i] == "*" { + // * so match next. + if i != len(pattern)-1 { + j := strings.Index(strings.ToLower(s), strings.ToLower(pattern[i+1])) + if j == -1 { + return false + } + s = s[j+len(pattern[i+1]):] + i++ + } + } else { + if !strings.HasPrefix(strings.ToLower(s), strings.ToLower(pattern[i])) { + return false + } + s = s[len(pattern[i]):] + } + } + return true +} diff --git a/d2ir/pattern_test.go b/d2ir/pattern_test.go new file mode 100644 index 000000000..aabd8be58 --- /dev/null +++ b/d2ir/pattern_test.go @@ -0,0 +1,335 @@ +package d2ir_test + +import ( + "testing" + + "oss.terrastruct.com/util-go/assert" +) + +func testCompilePatterns(t *testing.T) { + t.Parallel() + + tca := []testCase{ + { + name: "escaped", + run: func(t testing.TB) { + m, err := compile(t, `animal: meow +action: yes +a\*: globbed`) + assert.Success(t, err) + assertQuery(t, m, 3, 0, nil, "") + assertQuery(t, m, 0, 0, "meow", "animal") + assertQuery(t, m, 0, 0, "yes", "action") + assertQuery(t, m, 0, 0, "globbed", `a\*`) + }, + }, + { + name: "prefix", + run: func(t testing.TB) { + m, err := compile(t, `animal: meow +action: yes +a*: globbed`) + assert.Success(t, err) + assertQuery(t, m, 2, 0, nil, "") + assertQuery(t, m, 0, 0, "globbed", "animal") + assertQuery(t, m, 0, 0, "globbed", "action") + }, + }, + { + name: "case/1", + run: func(t testing.TB) { + m, err := compile(t, `animal: meow +action: yes +A*: globbed`) + assert.Success(t, err) + assertQuery(t, m, 2, 0, nil, "") + assertQuery(t, m, 0, 0, "globbed", "animal") + assertQuery(t, m, 0, 0, "globbed", "action") + }, + }, + { + name: "case/2", + run: func(t testing.TB) { + m, err := compile(t, `diddy kong +Donkey Kong +*kong: yes`) + assert.Success(t, err) + assertQuery(t, m, 2, 0, nil, "") + assertQuery(t, m, 0, 0, "yes", "diddy kong") + assertQuery(t, m, 0, 0, "yes", "Donkey Kong") + }, + }, + { + name: "suffix", + run: func(t testing.TB) { + m, err := compile(t, `animal: meow +jingle: loud +*l: globbed`) + assert.Success(t, err) + assertQuery(t, m, 2, 0, nil, "") + assertQuery(t, m, 0, 0, "globbed", "animal") + assertQuery(t, m, 0, 0, "globbed", "jingle") + }, + }, + { + name: "prefix-suffix", + run: func(t testing.TB) { + m, err := compile(t, `tinker: meow +thinker: yes +t*r: globbed`) + assert.Success(t, err) + assertQuery(t, m, 2, 0, nil, "") + assertQuery(t, m, 0, 0, "globbed", "tinker") + assertQuery(t, m, 0, 0, "globbed", "thinker") + }, + }, + { + name: "prefix-suffix/2", + run: func(t testing.TB) { + m, err := compile(t, `tinker: meow +thinker: yes +t*ink*r: globbed`) + assert.Success(t, err) + assertQuery(t, m, 2, 0, nil, "") + assertQuery(t, m, 0, 0, "globbed", "tinker") + assertQuery(t, m, 0, 0, "globbed", "thinker") + }, + }, + { + name: "prefix-suffix/3", + run: func(t testing.TB) { + m, err := compile(t, `tinkertinker: meow +thinkerthinker: yes +t*ink*r*t*inke*: globbed`) + assert.Success(t, err) + assertQuery(t, m, 2, 0, nil, "") + assertQuery(t, m, 0, 0, "globbed", "tinkertinker") + assertQuery(t, m, 0, 0, "globbed", "thinkerthinker") + }, + }, + { + name: "nested/prefix-suffix/3", + run: func(t testing.TB) { + m, err := compile(t, `animate.constant.tinkertinker: meow +astronaut.constant.thinkerthinker: yes +a*n*t*.constant.t*ink*r*t*inke*: globbed`) + assert.Success(t, err) + assertQuery(t, m, 6, 0, nil, "") + assertQuery(t, m, 0, 0, "globbed", "animate.constant.tinkertinker") + assertQuery(t, m, 0, 0, "globbed", "astronaut.constant.thinkerthinker") + }, + }, + { + name: "edge/1", + run: func(t testing.TB) { + m, err := compile(t, `animate +animal +an* -> an*`) + assert.Success(t, err) + assertQuery(t, m, 2, 2, nil, "") + assertQuery(t, m, 0, 0, nil, "(animate -> animal)[0]") + assertQuery(t, m, 0, 0, nil, "(animal -> animal)[0]") + }, + }, + { + name: "edge/2", + run: func(t testing.TB) { + m, err := compile(t, `shared.animate +shared.animal +sh*.(an* -> an*)`) + assert.Success(t, err) + assertQuery(t, m, 3, 2, nil, "") + assertQuery(t, m, 2, 2, nil, "shared") + assertQuery(t, m, 0, 0, nil, "shared.(animate -> animal)[0]") + assertQuery(t, m, 0, 0, nil, "shared.(animal -> animate)[0]") + }, + }, + { + name: "edge/3", + run: func(t testing.TB) { + m, err := compile(t, `shared.animate +shared.animal +sh*.an* -> sh*.an*`) + assert.Success(t, err) + assertQuery(t, m, 3, 2, nil, "") + assertQuery(t, m, 2, 2, nil, "shared") + assertQuery(t, m, 0, 0, nil, "shared.(animate -> animal)[0]") + assertQuery(t, m, 0, 0, nil, "shared.(animal -> animal)[0]") + }, + }, + { + name: "edge-glob-index", + run: func(t testing.TB) { + m, err := compile(t, `a -> b +a -> b +a -> b +(a -> b)[*].style.fill: red +`) + assert.Success(t, err) + assertQuery(t, m, 8, 3, nil, "") + assertQuery(t, m, 0, 0, "red", "(a -> b)[0].style.fill") + assertQuery(t, m, 0, 0, "red", "(a -> b)[1].style.fill") + assertQuery(t, m, 0, 0, "red", "(a -> b)[2].style.fill") + }, + }, + { + name: "glob-edge-glob-index", + run: func(t testing.TB) { + m, err := compile(t, `a -> b +a -> b +a -> b +c -> b +(* -> b)[*].style.fill: red +`) + assert.Success(t, err) + assertQuery(t, m, 11, 4, nil, "") + assertQuery(t, m, 0, 0, "red", "(a -> b)[0].style.fill") + assertQuery(t, m, 0, 0, "red", "(a -> b)[1].style.fill") + assertQuery(t, m, 0, 0, "red", "(a -> b)[2].style.fill") + assertQuery(t, m, 0, 0, "red", "(c -> b)[0].style.fill") + }, + }, + { + name: "edge-nexus", + run: func(t testing.TB) { + m, err := compile(t, `a +b +c +d +* -> nexus +`) + assert.Success(t, err) + assertQuery(t, m, 5, 4, nil, "") + assertQuery(t, m, 0, 0, nil, "(a -> nexus)[0]") + assertQuery(t, m, 0, 0, nil, "(b -> nexus)[0]") + assertQuery(t, m, 0, 0, nil, "(c -> nexus)[0]") + assertQuery(t, m, 0, 0, nil, "(d -> nexus)[0]") + }, + }, + { + name: "double-glob/1", + run: func(t testing.TB) { + m, err := compile(t, `shared.animate +shared.animal +**.style.fill: red`) + assert.Success(t, err) + assertQuery(t, m, 9, 0, nil, "") + assertQuery(t, m, 8, 0, nil, "shared") + assertQuery(t, m, 1, 0, nil, "shared.style") + assertQuery(t, m, 2, 0, nil, "shared.animate") + assertQuery(t, m, 1, 0, nil, "shared.animate.style") + assertQuery(t, m, 2, 0, nil, "shared.animal") + assertQuery(t, m, 1, 0, nil, "shared.animal.style") + }, + }, + { + name: "double-glob/edge-no-container", + run: func(t testing.TB) { + m, err := compile(t, `zone A: { + machine A + machine B: { + submachine A + submachine B + } +} +zone A.** -> load balancer +`) + assert.Success(t, err) + assertQuery(t, m, 6, 3, nil, "") + }, + }, + { + name: "reserved", + run: func(t testing.TB) { + m, err := compile(t, `vars: { + d2-config: { + layout-engine: elk + } +} + +Spiderman 1 +Spiderman 2 +Spiderman 3 + +* -> *: arrow`) + assert.Success(t, err) + assertQuery(t, m, 6, 6, nil, "") + assertQuery(t, m, 0, 0, "arrow", "(* -> *)[*]") + }, + }, + { + name: "scenarios", + run: func(t testing.TB) { + m, err := compile(t, ` + +scenarios: { + meow: { + e + f + g + h + } +} + +a +b +c +d + +**: something +** -> ** +`) + assert.Success(t, err) + assertQuery(t, m, 10, 24, nil, "") + assertQuery(t, m, 0, 0, "something", "**") + assertQuery(t, m, 0, 0, nil, "(* -> *)[*]") + }, + }, + { + name: "double-glob/edge/1", + run: func(t testing.TB) { + m, err := compile(t, `fast: { + a + far +} + +task: { + a +} + +task.** -> fast +`) + assert.Success(t, err) + assertQuery(t, m, 5, 1, nil, "") + }, + }, + { + name: "double-glob/edge/2", + run: func(t testing.TB) { + m, err := compile(t, `a + +**.b -> c +`) + assert.Success(t, err) + assertQuery(t, m, 3, 1, nil, "") + }, + }, + } + + runa(t, tca) + + t.Run("errors", func(t *testing.T) { + tca := []testCase{ + { + name: "glob-edge-glob-index", + run: func(t testing.TB) { + m, err := compile(t, `(* -> b)[*].style.fill: red +`) + assert.ErrorString(t, err, `TestCompile/patterns/errors/glob-edge-glob-index.d2:1:2: indexed edge does not exist`) + assertQuery(t, m, 0, 0, nil, "") + }, + }, + } + runa(t, tca) + }) +} diff --git a/d2ir/query.go b/d2ir/query.go index e70ad88df..8534d53e5 100644 --- a/d2ir/query.go +++ b/d2ir/query.go @@ -29,8 +29,14 @@ func (m *Map) QueryAll(idStr string) (na []Node, _ error) { } eida := NewEdgeIDs(k) - for _, eid := range eida { - ea := m.GetEdges(eid) + + for i, eid := range eida { + refctx := &RefContext{ + Key: k, + ScopeMap: m, + Edge: k.Edges[i], + } + ea := m.GetEdges(eid, refctx) for _, e := range ea { if k.EdgeKey == nil { na = append(na, e) @@ -56,7 +62,7 @@ func (m *Map) Query(idStr string) (Node, error) { return nil, nil } if len(na) > 1 { - return nil, fmt.Errorf("expected only one query result but got: %#v", err) + return nil, fmt.Errorf("expected only one query result but got: %#v", na) } return na[0], nil } diff --git a/d2parser/parse.go b/d2parser/parse.go index bb460da82..6f792d374 100644 --- a/d2parser/parse.go +++ b/d2parser/parse.go @@ -1030,9 +1030,15 @@ func (p *parser) parseUnquotedString(inKey bool) (s *d2ast.UnquotedString) { var sb strings.Builder var rawb strings.Builder + lastPatternIndex := 0 defer func() { sv := strings.TrimRightFunc(sb.String(), unicode.IsSpace) rawv := strings.TrimRightFunc(rawb.String(), unicode.IsSpace) + if s.Pattern != nil { + if lastPatternIndex < len(sv) { + s.Pattern = append(s.Pattern, sv[lastPatternIndex:]) + } + } if sv == "" { if len(s.Value) > 0 { return @@ -1118,18 +1124,12 @@ func (p *parser) parseUnquotedString(inKey bool) (s *d2ast.UnquotedString) { rawb.WriteRune(r) r = r2 case '*': - // TODO: need a peekNotSpace across escaped newlines - r2, eof := p.peek() - if eof { - return s + if sb.Len() == 0 { + s.Pattern = append(s.Pattern, "*") + } else { + s.Pattern = append(s.Pattern, sb.String()[lastPatternIndex:], "*") } - if r2 == '-' { - p.rewind() - return s - } - sb.WriteRune(r) - rawb.WriteRune(r) - r = r2 + lastPatternIndex = len(sb.String()) + 1 } } diff --git a/testdata/d2compiler/TestCompile2/nulls/basic/attribute.exp.json b/testdata/d2compiler/TestCompile2/nulls/basic/attribute.exp.json index 8b29a9497..fb4a47fbd 100644 --- a/testdata/d2compiler/TestCompile2/nulls/basic/attribute.exp.json +++ b/testdata/d2compiler/TestCompile2/nulls/basic/attribute.exp.json @@ -177,6 +177,48 @@ }, "key_path_index": 0, "map_key_edge_index": -1 + }, + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/basic/attribute.d2,2:0:22-2:15:37", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/basic/attribute.d2,2:0:22-2:1:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/basic/attribute.d2,2:2:24-2:7:29", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/basic/attribute.d2,2:8:30-2:15:37", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 } ], "attributes": { diff --git a/testdata/d2compiler/TestCompile2/nulls/implicit/delete-children.exp.json b/testdata/d2compiler/TestCompile2/nulls/implicit/delete-children.exp.json index 7d93bdeea..758fbbabb 100644 --- a/testdata/d2compiler/TestCompile2/nulls/implicit/delete-children.exp.json +++ b/testdata/d2compiler/TestCompile2/nulls/implicit/delete-children.exp.json @@ -232,6 +232,37 @@ }, "key_path_index": 0, "map_key_edge_index": -1 + }, + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-children.d2,5:0:22-5:3:25", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-children.d2,5:0:22-5:1:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-children.d2,5:2:24-5:3:25", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 } ], "attributes": { diff --git a/testdata/d2compiler/TestCompile2/nulls/reappear/children-reset.exp.json b/testdata/d2compiler/TestCompile2/nulls/reappear/children-reset.exp.json index 3e297fcec..6af8f1845 100644 --- a/testdata/d2compiler/TestCompile2/nulls/reappear/children-reset.exp.json +++ b/testdata/d2compiler/TestCompile2/nulls/reappear/children-reset.exp.json @@ -195,6 +195,37 @@ "key_path_index": 0, "map_key_edge_index": -1 }, + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/reappear/children-reset.d2,2:0:7-2:3:10", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/reappear/children-reset.d2,2:0:7-2:1:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/reappear/children-reset.d2,2:2:9-2:3:10", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + }, { "key": { "range": "d2/testdata/d2compiler/TestCompile2/nulls/reappear/children-reset.d2,3:0:17-3:3:20", diff --git a/testdata/d2ir/TestCompile/edges/chain.exp.json b/testdata/d2ir/TestCompile/edges/chain.exp.json index ea4624895..8484dbbdb 100644 --- a/testdata/d2ir/TestCompile/edges/chain.exp.json +++ b/testdata/d2ir/TestCompile/edges/chain.exp.json @@ -1136,7 +1136,8 @@ "b" ], "dst_arrow": true, - "index": 0 + "index": 0, + "glob": false }, "references": [ { @@ -1310,7 +1311,8 @@ "c" ], "dst_arrow": true, - "index": 0 + "index": 0, + "glob": false }, "references": [ { @@ -1484,7 +1486,8 @@ "d" ], "dst_arrow": true, - "index": 0 + "index": 0, + "glob": false }, "references": [ { diff --git a/testdata/d2ir/TestCompile/edges/nested.exp.json b/testdata/d2ir/TestCompile/edges/nested.exp.json index 06d098b77..548780974 100644 --- a/testdata/d2ir/TestCompile/edges/nested.exp.json +++ b/testdata/d2ir/TestCompile/edges/nested.exp.json @@ -704,7 +704,8 @@ "p" ], "dst_arrow": true, - "index": 0 + "index": 0, + "glob": false }, "references": [ { diff --git a/testdata/d2ir/TestCompile/edges/root.exp.json b/testdata/d2ir/TestCompile/edges/root.exp.json index a94dd5651..ec08bcf95 100644 --- a/testdata/d2ir/TestCompile/edges/root.exp.json +++ b/testdata/d2ir/TestCompile/edges/root.exp.json @@ -242,7 +242,8 @@ "y" ], "dst_arrow": true, - "index": 0 + "index": 0, + "glob": false }, "references": [ { diff --git a/testdata/d2ir/TestCompile/edges/underscore.exp.json b/testdata/d2ir/TestCompile/edges/underscore.exp.json index 878a4cff4..066323086 100644 --- a/testdata/d2ir/TestCompile/edges/underscore.exp.json +++ b/testdata/d2ir/TestCompile/edges/underscore.exp.json @@ -422,7 +422,8 @@ "z" ], "dst_arrow": true, - "index": 0 + "index": 0, + "glob": false }, "references": [ { diff --git a/testdata/d2ir/TestCompile/globs/escaped.exp.json b/testdata/d2ir/TestCompile/globs/escaped.exp.json new file mode 100644 index 000000000..de7e12d68 --- /dev/null +++ b/testdata/d2ir/TestCompile/globs/escaped.exp.json @@ -0,0 +1,159 @@ +{ + "fields": [ + { + "name": "animal", + "primary": { + "value": { + "range": "TestCompile/globs/escaped.d2,0:8:8-0:12:12", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/globs/escaped.d2,0:0:0-0:6:6", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + }, + "key_path": { + "range": "TestCompile/globs/escaped.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/globs/escaped.d2,0:0:0-0:6:6", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/globs/escaped.d2,0:0:0-0:12:12", + "key": { + "range": "TestCompile/globs/escaped.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/globs/escaped.d2,0:0:0-0:6:6", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/globs/escaped.d2,0:8:8-0:12:12", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + } + } + } + ] + }, + { + "name": "action", + "primary": { + "value": { + "range": "TestCompile/globs/escaped.d2,1:8:21-1:11:24", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/globs/escaped.d2,1:0:13-1:6:19", + "value": [ + { + "string": "action", + "raw_string": "action" + } + ] + }, + "key_path": { + "range": "TestCompile/globs/escaped.d2,1:0:13-1:6:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/globs/escaped.d2,1:0:13-1:6:19", + "value": [ + { + "string": "action", + "raw_string": "action" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/globs/escaped.d2,1:0:13-1:11:24", + "key": { + "range": "TestCompile/globs/escaped.d2,1:0:13-1:6:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/globs/escaped.d2,1:0:13-1:6:19", + "value": [ + { + "string": "action", + "raw_string": "action" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/globs/escaped.d2,1:8:21-1:11:24", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/globs/prefix.exp.json b/testdata/d2ir/TestCompile/globs/prefix.exp.json new file mode 100644 index 000000000..7c50c6809 --- /dev/null +++ b/testdata/d2ir/TestCompile/globs/prefix.exp.json @@ -0,0 +1,159 @@ +{ + "fields": [ + { + "name": "animal", + "primary": { + "value": { + "range": "TestCompile/globs/prefix.d2,0:8:8-0:12:12", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/globs/prefix.d2,0:0:0-0:6:6", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + }, + "key_path": { + "range": "TestCompile/globs/prefix.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/globs/prefix.d2,0:0:0-0:6:6", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/globs/prefix.d2,0:0:0-0:12:12", + "key": { + "range": "TestCompile/globs/prefix.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/globs/prefix.d2,0:0:0-0:6:6", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/globs/prefix.d2,0:8:8-0:12:12", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + } + } + } + ] + }, + { + "name": "action", + "primary": { + "value": { + "range": "TestCompile/globs/prefix.d2,1:8:21-1:11:24", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/globs/prefix.d2,1:0:13-1:6:19", + "value": [ + { + "string": "action", + "raw_string": "action" + } + ] + }, + "key_path": { + "range": "TestCompile/globs/prefix.d2,1:0:13-1:6:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/globs/prefix.d2,1:0:13-1:6:19", + "value": [ + { + "string": "action", + "raw_string": "action" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/globs/prefix.d2,1:0:13-1:11:24", + "key": { + "range": "TestCompile/globs/prefix.d2,1:0:13-1:6:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/globs/prefix.d2,1:0:13-1:6:19", + "value": [ + { + "string": "action", + "raw_string": "action" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/globs/prefix.d2,1:8:21-1:11:24", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/layers/errs/3/bad_edge.exp.json b/testdata/d2ir/TestCompile/layers/errs/3/bad_edge.exp.json new file mode 100644 index 000000000..5cd2e210c --- /dev/null +++ b/testdata/d2ir/TestCompile/layers/errs/3/bad_edge.exp.json @@ -0,0 +1,1375 @@ +{ + "fields": [ + { + "name": "layers", + "composite": { + "fields": [ + { + "name": "x", + "composite": { + "fields": [ + { + "name": "y", + "references": [ + { + "string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:9:9-0:10:10", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + }, + "key_path": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:10:10", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:7:7-0:8:8", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:9:9-0:10:10", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:23:23", + "src": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:10:10", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:7:7-0:8:8", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:9:9-0:10:10", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:23:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:19:19", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:20:20-0:21:21", + "value": [ + { + "string": "z", + "raw_string": "z" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:22:22-0:23:23", + "value": [ + { + "string": "p", + "raw_string": "p" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:23:23", + "edges": [ + { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:23:23", + "src": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:10:10", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:7:7-0:8:8", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:9:9-0:10:10", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:23:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:19:19", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:20:20-0:21:21", + "value": [ + { + "string": "z", + "raw_string": "z" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:22:22-0:23:23", + "value": [ + { + "string": "p", + "raw_string": "p" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:7:7-0:8:8", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:10:10", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:7:7-0:8:8", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:9:9-0:10:10", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:23:23", + "src": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:10:10", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:7:7-0:8:8", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:9:9-0:10:10", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:23:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:19:19", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:20:20-0:21:21", + "value": [ + { + "string": "z", + "raw_string": "z" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:22:22-0:23:23", + "value": [ + { + "string": "p", + "raw_string": "p" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:23:23", + "edges": [ + { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:23:23", + "src": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:10:10", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:7:7-0:8:8", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:9:9-0:10:10", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:23:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:19:19", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:20:20-0:21:21", + "value": [ + { + "string": "z", + "raw_string": "z" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:22:22-0:23:23", + "value": [ + { + "string": "p", + "raw_string": "p" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + }, + "key_path": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:10:10", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:7:7-0:8:8", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:9:9-0:10:10", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:23:23", + "src": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:10:10", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:7:7-0:8:8", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:9:9-0:10:10", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:23:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:19:19", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:20:20-0:21:21", + "value": [ + { + "string": "z", + "raw_string": "z" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:22:22-0:23:23", + "value": [ + { + "string": "p", + "raw_string": "p" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:23:23", + "edges": [ + { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:23:23", + "src": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:10:10", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:7:7-0:8:8", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:9:9-0:10:10", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:23:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:19:19", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:20:20-0:21:21", + "value": [ + { + "string": "z", + "raw_string": "z" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:22:22-0:23:23", + "value": [ + { + "string": "p", + "raw_string": "p" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "steps", + "composite": { + "fields": [ + { + "name": "z", + "composite": { + "fields": [ + { + "name": "p", + "references": [ + { + "string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:22:22-0:23:23", + "value": [ + { + "string": "p", + "raw_string": "p" + } + ] + }, + "key_path": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:23:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:19:19", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:20:20-0:21:21", + "value": [ + { + "string": "z", + "raw_string": "z" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:22:22-0:23:23", + "value": [ + { + "string": "p", + "raw_string": "p" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:23:23", + "src": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:10:10", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:7:7-0:8:8", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:9:9-0:10:10", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:23:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:19:19", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:20:20-0:21:21", + "value": [ + { + "string": "z", + "raw_string": "z" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:22:22-0:23:23", + "value": [ + { + "string": "p", + "raw_string": "p" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:23:23", + "edges": [ + { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:23:23", + "src": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:10:10", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:7:7-0:8:8", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:9:9-0:10:10", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:23:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:19:19", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:20:20-0:21:21", + "value": [ + { + "string": "z", + "raw_string": "z" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:22:22-0:23:23", + "value": [ + { + "string": "p", + "raw_string": "p" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:20:20-0:21:21", + "value": [ + { + "string": "z", + "raw_string": "z" + } + ] + }, + "key_path": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:23:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:19:19", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:20:20-0:21:21", + "value": [ + { + "string": "z", + "raw_string": "z" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:22:22-0:23:23", + "value": [ + { + "string": "p", + "raw_string": "p" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:23:23", + "src": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:10:10", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:7:7-0:8:8", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:9:9-0:10:10", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:23:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:19:19", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:20:20-0:21:21", + "value": [ + { + "string": "z", + "raw_string": "z" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:22:22-0:23:23", + "value": [ + { + "string": "p", + "raw_string": "p" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:23:23", + "edges": [ + { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:23:23", + "src": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:10:10", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:7:7-0:8:8", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:9:9-0:10:10", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:23:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:19:19", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:20:20-0:21:21", + "value": [ + { + "string": "z", + "raw_string": "z" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:22:22-0:23:23", + "value": [ + { + "string": "p", + "raw_string": "p" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:19:19", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + }, + "key_path": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:23:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:19:19", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:20:20-0:21:21", + "value": [ + { + "string": "z", + "raw_string": "z" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:22:22-0:23:23", + "value": [ + { + "string": "p", + "raw_string": "p" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:23:23", + "src": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:10:10", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:7:7-0:8:8", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:9:9-0:10:10", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:23:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:19:19", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:20:20-0:21:21", + "value": [ + { + "string": "z", + "raw_string": "z" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:22:22-0:23:23", + "value": [ + { + "string": "p", + "raw_string": "p" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:23:23", + "edges": [ + { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:23:23", + "src": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:10:10", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:7:7-0:8:8", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:9:9-0:10:10", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:23:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:14:14-0:19:19", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:20:20-0:21:21", + "value": [ + { + "string": "z", + "raw_string": "z" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/layers/errs/3/bad_edge.d2,0:22:22-0:23:23", + "value": [ + { + "string": "p", + "raw_string": "p" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/layers/errs/4/good_edge.exp.json b/testdata/d2ir/TestCompile/layers/errs/4/good_edge.exp.json index 7a7f1e434..c18033088 100644 --- a/testdata/d2ir/TestCompile/layers/errs/4/good_edge.exp.json +++ b/testdata/d2ir/TestCompile/layers/errs/4/good_edge.exp.json @@ -465,7 +465,8 @@ "y" ], "dst_arrow": true, - "index": 0 + "index": 0, + "glob": false }, "references": [ { diff --git a/testdata/d2ir/TestCompile/layers/root.exp.json b/testdata/d2ir/TestCompile/layers/root.exp.json index 27e7e95c6..82ca928ad 100644 --- a/testdata/d2ir/TestCompile/layers/root.exp.json +++ b/testdata/d2ir/TestCompile/layers/root.exp.json @@ -805,7 +805,8 @@ "y" ], "dst_arrow": true, - "index": 0 + "index": 0, + "glob": false }, "references": [ { diff --git a/testdata/d2ir/TestCompile/patterns/case.exp.json b/testdata/d2ir/TestCompile/patterns/case.exp.json new file mode 100644 index 000000000..4c0ba1765 --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/case.exp.json @@ -0,0 +1,159 @@ +{ + "fields": [ + { + "name": "animal", + "primary": { + "value": { + "range": "TestCompile/patterns/case.d2,2:4:29-2:11:36", + "value": [ + { + "string": "globbed", + "raw_string": "globbed" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/case.d2,0:0:0-0:6:6", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/case.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/case.d2,0:0:0-0:6:6", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/case.d2,0:0:0-0:12:12", + "key": { + "range": "TestCompile/patterns/case.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/case.d2,0:0:0-0:6:6", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/case.d2,0:8:8-0:12:12", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + } + } + } + ] + }, + { + "name": "action", + "primary": { + "value": { + "range": "TestCompile/patterns/case.d2,2:4:29-2:11:36", + "value": [ + { + "string": "globbed", + "raw_string": "globbed" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/case.d2,1:0:13-1:6:19", + "value": [ + { + "string": "action", + "raw_string": "action" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/case.d2,1:0:13-1:6:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/case.d2,1:0:13-1:6:19", + "value": [ + { + "string": "action", + "raw_string": "action" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/case.d2,1:0:13-1:11:24", + "key": { + "range": "TestCompile/patterns/case.d2,1:0:13-1:6:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/case.d2,1:0:13-1:6:19", + "value": [ + { + "string": "action", + "raw_string": "action" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/case.d2,1:8:21-1:11:24", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/patterns/case/1.exp.json b/testdata/d2ir/TestCompile/patterns/case/1.exp.json new file mode 100644 index 000000000..292d5d24e --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/case/1.exp.json @@ -0,0 +1,159 @@ +{ + "fields": [ + { + "name": "animal", + "primary": { + "value": { + "range": "TestCompile/patterns/case/1.d2,2:4:29-2:11:36", + "value": [ + { + "string": "globbed", + "raw_string": "globbed" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/case/1.d2,0:0:0-0:6:6", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/case/1.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/case/1.d2,0:0:0-0:6:6", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/case/1.d2,0:0:0-0:12:12", + "key": { + "range": "TestCompile/patterns/case/1.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/case/1.d2,0:0:0-0:6:6", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/case/1.d2,0:8:8-0:12:12", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + } + } + } + ] + }, + { + "name": "action", + "primary": { + "value": { + "range": "TestCompile/patterns/case/1.d2,2:4:29-2:11:36", + "value": [ + { + "string": "globbed", + "raw_string": "globbed" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/case/1.d2,1:0:13-1:6:19", + "value": [ + { + "string": "action", + "raw_string": "action" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/case/1.d2,1:0:13-1:6:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/case/1.d2,1:0:13-1:6:19", + "value": [ + { + "string": "action", + "raw_string": "action" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/case/1.d2,1:0:13-1:11:24", + "key": { + "range": "TestCompile/patterns/case/1.d2,1:0:13-1:6:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/case/1.d2,1:0:13-1:6:19", + "value": [ + { + "string": "action", + "raw_string": "action" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/case/1.d2,1:8:21-1:11:24", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/patterns/case/2.exp.json b/testdata/d2ir/TestCompile/patterns/case/2.exp.json new file mode 100644 index 000000000..283008b8a --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/case/2.exp.json @@ -0,0 +1,139 @@ +{ + "fields": [ + { + "name": "diddy kong", + "primary": { + "value": { + "range": "TestCompile/patterns/case/2.d2,2:7:30-2:10:33", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/case/2.d2,0:0:0-0:10:10", + "value": [ + { + "string": "diddy kong", + "raw_string": "diddy kong" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/case/2.d2,0:0:0-0:10:10", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/case/2.d2,0:0:0-0:10:10", + "value": [ + { + "string": "diddy kong", + "raw_string": "diddy kong" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/case/2.d2,0:0:0-0:10:10", + "key": { + "range": "TestCompile/patterns/case/2.d2,0:0:0-0:10:10", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/case/2.d2,0:0:0-0:10:10", + "value": [ + { + "string": "diddy kong", + "raw_string": "diddy kong" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "Donkey Kong", + "primary": { + "value": { + "range": "TestCompile/patterns/case/2.d2,2:7:30-2:10:33", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/case/2.d2,1:0:11-1:11:22", + "value": [ + { + "string": "Donkey Kong", + "raw_string": "Donkey Kong" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/case/2.d2,1:0:11-1:11:22", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/case/2.d2,1:0:11-1:11:22", + "value": [ + { + "string": "Donkey Kong", + "raw_string": "Donkey Kong" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/case/2.d2,1:0:11-1:11:22", + "key": { + "range": "TestCompile/patterns/case/2.d2,1:0:11-1:11:22", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/case/2.d2,1:0:11-1:11:22", + "value": [ + { + "string": "Donkey Kong", + "raw_string": "Donkey Kong" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/patterns/double-glob.exp.json b/testdata/d2ir/TestCompile/patterns/double-glob.exp.json new file mode 100644 index 000000000..4696f0b15 --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/double-glob.exp.json @@ -0,0 +1,903 @@ +{ + "fields": [ + { + "name": "shared", + "composite": { + "fields": [ + { + "name": "animate", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/patterns/double-glob.d2,2:18:47-2:21:50", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob.d2,2:12:41-2:16:45", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:16:45", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:11:40", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:12:41-2:16:45", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:22:51", + "key": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:16:45", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:11:40", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:12:41-2:16:45", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:18:47-2:21:50", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:11:40", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:16:45", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:11:40", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:12:41-2:16:45", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:22:51", + "key": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:16:45", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:11:40", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:12:41-2:16:45", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:18:47-2:21:50", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob.d2,0:0:0-0:14:14", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,0:0:0-0:6:6", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob.d2,0:0:0-0:14:14", + "key": { + "range": "TestCompile/patterns/double-glob.d2,0:0:0-0:14:14", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,0:0:0-0:6:6", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "animal", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/patterns/double-glob.d2,2:18:47-2:21:50", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob.d2,2:12:41-2:16:45", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:16:45", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:11:40", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:12:41-2:16:45", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:22:51", + "key": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:16:45", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:11:40", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:12:41-2:16:45", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:18:47-2:21:50", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:11:40", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:16:45", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:11:40", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:12:41-2:16:45", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:22:51", + "key": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:16:45", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:11:40", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:12:41-2:16:45", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:18:47-2:21:50", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob.d2,1:0:15-1:13:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,1:0:15-1:6:21", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob.d2,1:0:15-1:13:28", + "key": { + "range": "TestCompile/patterns/double-glob.d2,1:0:15-1:13:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,1:0:15-1:6:21", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/patterns/double-glob.d2,2:18:47-2:21:50", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob.d2,2:12:41-2:16:45", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:16:45", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:11:40", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:12:41-2:16:45", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:22:51", + "key": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:16:45", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:11:40", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:12:41-2:16:45", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:18:47-2:21:50", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:11:40", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:16:45", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:11:40", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:12:41-2:16:45", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:22:51", + "key": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:16:45", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:6:35-2:11:40", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:12:41-2:16:45", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,2:18:47-2:21:50", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob.d2,0:0:0-0:6:6", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob.d2,0:0:0-0:14:14", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,0:0:0-0:6:6", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob.d2,0:0:0-0:14:14", + "key": { + "range": "TestCompile/patterns/double-glob.d2,0:0:0-0:14:14", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,0:0:0-0:6:6", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + }, + { + "string": { + "range": "TestCompile/patterns/double-glob.d2,1:0:15-1:6:21", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob.d2,1:0:15-1:13:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,1:0:15-1:6:21", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob.d2,1:0:15-1:13:28", + "key": { + "range": "TestCompile/patterns/double-glob.d2,1:0:15-1:13:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,1:0:15-1:6:21", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/patterns/double-glob/1.exp.json b/testdata/d2ir/TestCompile/patterns/double-glob/1.exp.json new file mode 100644 index 000000000..804f187d0 --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/double-glob/1.exp.json @@ -0,0 +1,1095 @@ +{ + "fields": [ + { + "name": "shared", + "composite": { + "fields": [ + { + "name": "animate", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/patterns/double-glob/1.d2,2:15:44-2:18:47", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:9:38-2:13:42", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:13:42", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:2:31", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:3:32-2:8:37", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:9:38-2:13:42", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:18:47", + "key": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:13:42", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:2:31", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:3:32-2:8:37", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:9:38-2:13:42", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:15:44-2:18:47", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:3:32-2:8:37", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:13:42", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:2:31", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:3:32-2:8:37", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:9:38-2:13:42", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:18:47", + "key": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:13:42", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:2:31", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:3:32-2:8:37", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:9:38-2:13:42", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:15:44-2:18:47", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/1.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/1.d2,0:0:0-0:14:14", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,0:0:0-0:6:6", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob/1.d2,0:0:0-0:14:14", + "key": { + "range": "TestCompile/patterns/double-glob/1.d2,0:0:0-0:14:14", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,0:0:0-0:6:6", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "animal", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/patterns/double-glob/1.d2,2:15:44-2:18:47", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:9:38-2:13:42", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:13:42", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:2:31", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:3:32-2:8:37", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:9:38-2:13:42", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:18:47", + "key": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:13:42", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:2:31", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:3:32-2:8:37", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:9:38-2:13:42", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:15:44-2:18:47", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:3:32-2:8:37", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:13:42", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:2:31", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:3:32-2:8:37", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:9:38-2:13:42", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:18:47", + "key": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:13:42", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:2:31", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:3:32-2:8:37", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:9:38-2:13:42", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:15:44-2:18:47", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/1.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/1.d2,1:0:15-1:13:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,1:0:15-1:6:21", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob/1.d2,1:0:15-1:13:28", + "key": { + "range": "TestCompile/patterns/double-glob/1.d2,1:0:15-1:13:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,1:0:15-1:6:21", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/patterns/double-glob/1.d2,2:15:44-2:18:47", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:9:38-2:13:42", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:13:42", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:2:31", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:3:32-2:8:37", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:9:38-2:13:42", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:18:47", + "key": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:13:42", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:2:31", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:3:32-2:8:37", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:9:38-2:13:42", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:15:44-2:18:47", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:3:32-2:8:37", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:13:42", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:2:31", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:3:32-2:8:37", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:9:38-2:13:42", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:18:47", + "key": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:13:42", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:0:29-2:2:31", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:3:32-2:8:37", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:9:38-2:13:42", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,2:15:44-2:18:47", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/1.d2,0:0:0-0:6:6", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/1.d2,0:0:0-0:14:14", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,0:0:0-0:6:6", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob/1.d2,0:0:0-0:14:14", + "key": { + "range": "TestCompile/patterns/double-glob/1.d2,0:0:0-0:14:14", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,0:0:0-0:6:6", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + }, + { + "string": { + "range": "TestCompile/patterns/double-glob/1.d2,1:0:15-1:6:21", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/1.d2,1:0:15-1:13:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,1:0:15-1:6:21", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob/1.d2,1:0:15-1:13:28", + "key": { + "range": "TestCompile/patterns/double-glob/1.d2,1:0:15-1:13:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,1:0:15-1:6:21", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/1.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/patterns/double-glob/edge-no-container.exp.json b/testdata/d2ir/TestCompile/patterns/double-glob/edge-no-container.exp.json new file mode 100644 index 000000000..9e115779c --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/double-glob/edge-no-container.exp.json @@ -0,0 +1,1161 @@ +{ + "fields": [ + { + "name": "zone A", + "composite": { + "fields": [ + { + "name": "machine A", + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,1:1:11-1:10:20", + "value": [ + { + "string": "machine A", + "raw_string": "machine A" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,1:1:11-1:10:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,1:1:11-1:10:20", + "value": [ + { + "string": "machine A", + "raw_string": "machine A" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,1:1:11-1:10:20", + "key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,1:1:11-1:10:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,1:1:11-1:10:20", + "value": [ + { + "string": "machine A", + "raw_string": "machine A" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "machine B", + "composite": { + "fields": [ + { + "name": "submachine A", + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,3:2:37-3:14:49", + "value": [ + { + "string": "submachine A", + "raw_string": "submachine A" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,3:2:37-3:14:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,3:2:37-3:14:49", + "value": [ + { + "string": "submachine A", + "raw_string": "submachine A" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,3:2:37-3:14:49", + "key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,3:2:37-3:14:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,3:2:37-3:14:49", + "value": [ + { + "string": "submachine A", + "raw_string": "submachine A" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "submachine B", + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,4:2:52-4:14:64", + "value": [ + { + "string": "submachine B", + "raw_string": "submachine B" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,4:2:52-4:14:64", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,4:2:52-4:14:64", + "value": [ + { + "string": "submachine B", + "raw_string": "submachine B" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,4:2:52-4:14:64", + "key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,4:2:52-4:14:64", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,4:2:52-4:14:64", + "value": [ + { + "string": "submachine B", + "raw_string": "submachine B" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,2:1:22-2:10:31", + "value": [ + { + "string": "machine B", + "raw_string": "machine B" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,2:1:22-2:10:31", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,2:1:22-2:10:31", + "value": [ + { + "string": "machine B", + "raw_string": "machine B" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,2:1:22-5:2:67", + "key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,2:1:22-2:10:31", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,2:1:22-2:10:31", + "value": [ + { + "string": "machine B", + "raw_string": "machine B" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,2:12:33-5:2:67", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,3:2:37-3:14:49", + "key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,3:2:37-3:14:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,3:2:37-3:14:49", + "value": [ + { + "string": "submachine A", + "raw_string": "submachine A" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,4:2:52-4:14:64", + "key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,4:2:52-4:14:64", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,4:2:52-4:14:64", + "value": [ + { + "string": "submachine B", + "raw_string": "submachine B" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,0:0:0-0:6:6", + "value": [ + { + "string": "zone A", + "raw_string": "zone A" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,0:0:0-0:6:6", + "value": [ + { + "string": "zone A", + "raw_string": "zone A" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,0:0:0-6:1:69", + "key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,0:0:0-0:6:6", + "value": [ + { + "string": "zone A", + "raw_string": "zone A" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,0:8:8-6:1:69", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,1:1:11-1:10:20", + "key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,1:1:11-1:10:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,1:1:11-1:10:20", + "value": [ + { + "string": "machine A", + "raw_string": "machine A" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,2:1:22-5:2:67", + "key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,2:1:22-2:10:31", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,2:1:22-2:10:31", + "value": [ + { + "string": "machine B", + "raw_string": "machine B" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,2:12:33-5:2:67", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,3:2:37-3:14:49", + "key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,3:2:37-3:14:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,3:2:37-3:14:49", + "value": [ + { + "string": "submachine A", + "raw_string": "submachine A" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,4:2:52-4:14:64", + "key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,4:2:52-4:14:64", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,4:2:52-4:14:64", + "value": [ + { + "string": "submachine B", + "raw_string": "submachine B" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:6:76", + "value": [ + { + "string": "zone A", + "raw_string": "zone A" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:9:79", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:6:76", + "value": [ + { + "string": "zone A", + "raw_string": "zone A" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:7:77-7:9:79", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:26:96", + "src": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:9:79", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:6:76", + "value": [ + { + "string": "zone A", + "raw_string": "zone A" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:7:77-7:9:79", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "value": [ + { + "string": "load balancer", + "raw_string": "load balancer" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:26:96", + "edges": [ + { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:26:96", + "src": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:9:79", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:6:76", + "value": [ + { + "string": "zone A", + "raw_string": "zone A" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:7:77-7:9:79", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "value": [ + { + "string": "load balancer", + "raw_string": "load balancer" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "load balancer", + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "value": [ + { + "string": "load balancer", + "raw_string": "load balancer" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "value": [ + { + "string": "load balancer", + "raw_string": "load balancer" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:26:96", + "src": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:9:79", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:6:76", + "value": [ + { + "string": "zone A", + "raw_string": "zone A" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:7:77-7:9:79", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "value": [ + { + "string": "load balancer", + "raw_string": "load balancer" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:26:96", + "edges": [ + { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:26:96", + "src": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:9:79", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:6:76", + "value": [ + { + "string": "zone A", + "raw_string": "zone A" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:7:77-7:9:79", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "value": [ + { + "string": "load balancer", + "raw_string": "load balancer" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": [ + { + "edge_id": { + "src_path": [ + "zone A", + "machine A" + ], + "src_arrow": false, + "dst_path": [ + "load balancer" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:26:96", + "src": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:9:79", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:6:76", + "value": [ + { + "string": "zone A", + "raw_string": "zone A" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:7:77-7:9:79", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "value": [ + { + "string": "load balancer", + "raw_string": "load balancer" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:26:96", + "edges": [ + { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:26:96", + "src": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:9:79", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:6:76", + "value": [ + { + "string": "zone A", + "raw_string": "zone A" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:7:77-7:9:79", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "value": [ + { + "string": "load balancer", + "raw_string": "load balancer" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "zone A", + "machine B", + "submachine A" + ], + "src_arrow": false, + "dst_path": [ + "load balancer" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:26:96", + "src": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:9:79", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:6:76", + "value": [ + { + "string": "zone A", + "raw_string": "zone A" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:7:77-7:9:79", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "value": [ + { + "string": "load balancer", + "raw_string": "load balancer" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:26:96", + "edges": [ + { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:26:96", + "src": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:9:79", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:6:76", + "value": [ + { + "string": "zone A", + "raw_string": "zone A" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:7:77-7:9:79", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "value": [ + { + "string": "load balancer", + "raw_string": "load balancer" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "zone A", + "machine B", + "submachine B" + ], + "src_arrow": false, + "dst_path": [ + "load balancer" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:26:96", + "src": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:9:79", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:6:76", + "value": [ + { + "string": "zone A", + "raw_string": "zone A" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:7:77-7:9:79", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "value": [ + { + "string": "load balancer", + "raw_string": "load balancer" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:26:96", + "edges": [ + { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:26:96", + "src": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:9:79", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:0:70-7:6:76", + "value": [ + { + "string": "zone A", + "raw_string": "zone A" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:7:77-7:9:79", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge-no-container.d2,7:13:83-7:26:96", + "value": [ + { + "string": "load balancer", + "raw_string": "load balancer" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + } + ] +} diff --git a/testdata/d2ir/TestCompile/patterns/double-glob/edge/1.exp.json b/testdata/d2ir/TestCompile/patterns/double-glob/edge/1.exp.json new file mode 100644 index 000000000..209501268 --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/double-glob/edge/1.exp.json @@ -0,0 +1,811 @@ +{ + "fields": [ + { + "name": "fast", + "composite": { + "fields": [ + { + "name": "a", + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,1:2:10-1:3:11", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,1:2:10-1:3:11", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,1:2:10-1:3:11", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,1:2:10-1:3:11", + "key": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,1:2:10-1:3:11", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,1:2:10-1:3:11", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "far", + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,2:2:14-2:5:17", + "value": [ + { + "string": "far", + "raw_string": "far" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,2:2:14-2:5:17", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,2:2:14-2:5:17", + "value": [ + { + "string": "far", + "raw_string": "far" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,2:2:14-2:5:17", + "key": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,2:2:14-2:5:17", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,2:2:14-2:5:17", + "value": [ + { + "string": "far", + "raw_string": "far" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,0:0:0-0:4:4", + "value": [ + { + "string": "fast", + "raw_string": "fast" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,0:0:0-0:4:4", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,0:0:0-0:4:4", + "value": [ + { + "string": "fast", + "raw_string": "fast" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,0:0:0-3:1:19", + "key": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,0:0:0-0:4:4", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,0:0:0-0:4:4", + "value": [ + { + "string": "fast", + "raw_string": "fast" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,0:6:6-3:1:19", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,1:2:10-1:3:11", + "key": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,1:2:10-1:3:11", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,1:2:10-1:3:11", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,2:2:14-2:5:17", + "key": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,2:2:14-2:5:17", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,2:2:14-2:5:17", + "value": [ + { + "string": "far", + "raw_string": "far" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:11:47-9:15:51", + "value": [ + { + "string": "fast", + "raw_string": "fast" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:11:47-9:15:51", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:11:47-9:15:51", + "value": [ + { + "string": "fast", + "raw_string": "fast" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:15:51", + "src": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:7:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:4:40", + "value": [ + { + "string": "task", + "raw_string": "task" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:5:41-9:7:43", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:11:47-9:15:51", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:11:47-9:15:51", + "value": [ + { + "string": "fast", + "raw_string": "fast" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:15:51", + "edges": [ + { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:15:51", + "src": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:7:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:4:40", + "value": [ + { + "string": "task", + "raw_string": "task" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:5:41-9:7:43", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:11:47-9:15:51", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:11:47-9:15:51", + "value": [ + { + "string": "fast", + "raw_string": "fast" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "task", + "composite": { + "fields": [ + { + "name": "a", + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,6:2:31-6:3:32", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,6:2:31-6:3:32", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,6:2:31-6:3:32", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,6:2:31-6:3:32", + "key": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,6:2:31-6:3:32", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,6:2:31-6:3:32", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,5:0:21-5:4:25", + "value": [ + { + "string": "task", + "raw_string": "task" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,5:0:21-5:4:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,5:0:21-5:4:25", + "value": [ + { + "string": "task", + "raw_string": "task" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,5:0:21-7:1:34", + "key": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,5:0:21-5:4:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,5:0:21-5:4:25", + "value": [ + { + "string": "task", + "raw_string": "task" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,5:6:27-7:1:34", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,6:2:31-6:3:32", + "key": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,6:2:31-6:3:32", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,6:2:31-6:3:32", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:4:40", + "value": [ + { + "string": "task", + "raw_string": "task" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:7:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:4:40", + "value": [ + { + "string": "task", + "raw_string": "task" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:5:41-9:7:43", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:15:51", + "src": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:7:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:4:40", + "value": [ + { + "string": "task", + "raw_string": "task" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:5:41-9:7:43", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:11:47-9:15:51", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:11:47-9:15:51", + "value": [ + { + "string": "fast", + "raw_string": "fast" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:15:51", + "edges": [ + { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:15:51", + "src": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:7:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:4:40", + "value": [ + { + "string": "task", + "raw_string": "task" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:5:41-9:7:43", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:11:47-9:15:51", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:11:47-9:15:51", + "value": [ + { + "string": "fast", + "raw_string": "fast" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": [ + { + "edge_id": { + "src_path": [ + "task", + "a" + ], + "src_arrow": false, + "dst_path": [ + "fast" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:15:51", + "src": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:7:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:4:40", + "value": [ + { + "string": "task", + "raw_string": "task" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:5:41-9:7:43", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:11:47-9:15:51", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:11:47-9:15:51", + "value": [ + { + "string": "fast", + "raw_string": "fast" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:15:51", + "edges": [ + { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:15:51", + "src": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:7:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:0:36-9:4:40", + "value": [ + { + "string": "task", + "raw_string": "task" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:5:41-9:7:43", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:11:47-9:15:51", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/1.d2,9:11:47-9:15:51", + "value": [ + { + "string": "fast", + "raw_string": "fast" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + } + ] +} diff --git a/testdata/d2ir/TestCompile/patterns/double-glob/edge/2.exp.json b/testdata/d2ir/TestCompile/patterns/double-glob/edge/2.exp.json new file mode 100644 index 000000000..ec8c116c4 --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/double-glob/edge/2.exp.json @@ -0,0 +1,511 @@ +{ + "fields": [ + { + "name": "a", + "composite": { + "fields": [ + { + "name": "b", + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:3:6-2:4:7", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:4:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:2:5", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:3:6-2:4:7", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:9:12", + "src": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:4:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:2:5", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:3:6-2:4:7", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:8:11-2:9:12", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:8:11-2:9:12", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:9:12", + "edges": [ + { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:9:12", + "src": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:4:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:2:5", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:3:6-2:4:7", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:8:11-2:9:12", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:8:11-2:9:12", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,0:0:0-0:1:1", + "key": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "c", + "references": [ + { + "string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:8:11-2:9:12", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:8:11-2:9:12", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:8:11-2:9:12", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:9:12", + "src": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:4:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:2:5", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:3:6-2:4:7", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:8:11-2:9:12", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:8:11-2:9:12", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:9:12", + "edges": [ + { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:9:12", + "src": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:4:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:2:5", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:3:6-2:4:7", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:8:11-2:9:12", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:8:11-2:9:12", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": [ + { + "edge_id": { + "src_path": [ + "a", + "b" + ], + "src_arrow": false, + "dst_path": [ + "c" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:9:12", + "src": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:4:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:2:5", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:3:6-2:4:7", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:8:11-2:9:12", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:8:11-2:9:12", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:9:12", + "edges": [ + { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:9:12", + "src": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:4:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:0:3-2:2:5", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:3:6-2:4:7", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:8:11-2:9:12", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/double-glob/edge/2.d2,2:8:11-2:9:12", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + } + ] +} diff --git a/testdata/d2ir/TestCompile/patterns/edge-glob-index.exp.json b/testdata/d2ir/TestCompile/patterns/edge-glob-index.exp.json new file mode 100644 index 000000000..8da87a6c9 --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/edge-glob-index.exp.json @@ -0,0 +1,3343 @@ +{ + "fields": [ + { + "name": "a", + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:6:6", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:6:6", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:6:6", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:1:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:1:8", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:1:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:6:13", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:1:8", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:1:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:5:12-1:6:13", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:5:12-1:6:13", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:6:13", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:6:13", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:1:8", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:1:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:5:12-1:6:13", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:5:12-1:6:13", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:1:15", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:1:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:1:15", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:6:20", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:1:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:1:15", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:5:19-2:6:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:5:19-2:6:20", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:6:20", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:6:20", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:1:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:1:15", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:5:19-2:6:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:5:19-2:6:20", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + }, + { + "name": "b", + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:6:6", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:6:6", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:6:6", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:5:12-1:6:13", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:5:12-1:6:13", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:5:12-1:6:13", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:6:13", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:1:8", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:1:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:5:12-1:6:13", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:5:12-1:6:13", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:6:13", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:6:13", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:1:8", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:1:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:5:12-1:6:13", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:5:12-1:6:13", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:5:19-2:6:20", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:5:19-2:6:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:5:19-2:6:20", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:6:20", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:1:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:1:15", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:5:19-2:6:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:5:19-2:6:20", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:6:20", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:6:20", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:1:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:1:15", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:5:19-2:6:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:5:19-2:6:20", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": [ + { + "edge_id": { + "src_path": [ + "a" + ], + "src_arrow": false, + "dst_path": [ + "b" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "map": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:6:6", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:6:6", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:6:6", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + }, + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "a" + ], + "src_arrow": false, + "dst_path": [ + "b" + ], + "dst_arrow": true, + "index": 1, + "glob": false + }, + "map": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:6:13", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:1:8", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:1:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:5:12-1:6:13", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:5:12-1:6:13", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:6:13", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:6:13", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:1:8", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:0:7-1:1:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:5:12-1:6:13", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,1:5:12-1:6:13", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + }, + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "a" + ], + "src_arrow": false, + "dst_path": [ + "b" + ], + "dst_arrow": true, + "index": 2, + "glob": false + }, + "map": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:6:20", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:1:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:1:15", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:5:19-2:6:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:5:19-2:6:20", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:6:20", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:6:20", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:1:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:0:14-2:1:15", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:5:19-2:6:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,2:5:19-2:6:20", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + }, + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", + "src": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ] +} diff --git a/testdata/d2ir/TestCompile/patterns/edge-nexus.exp.json b/testdata/d2ir/TestCompile/patterns/edge-nexus.exp.json new file mode 100644 index 000000000..ee685d494 --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/edge-nexus.exp.json @@ -0,0 +1,779 @@ +{ + "fields": [ + { + "name": "a", + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-nexus.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-nexus.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-nexus.d2,0:0:0-0:1:1", + "key": { + "range": "TestCompile/patterns/edge-nexus.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "b", + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-nexus.d2,1:0:2-1:1:3", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-nexus.d2,1:0:2-1:1:3", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,1:0:2-1:1:3", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-nexus.d2,1:0:2-1:1:3", + "key": { + "range": "TestCompile/patterns/edge-nexus.d2,1:0:2-1:1:3", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,1:0:2-1:1:3", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "c", + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-nexus.d2,2:0:4-2:1:5", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-nexus.d2,2:0:4-2:1:5", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,2:0:4-2:1:5", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-nexus.d2,2:0:4-2:1:5", + "key": { + "range": "TestCompile/patterns/edge-nexus.d2,2:0:4-2:1:5", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,2:0:4-2:1:5", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "d", + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-nexus.d2,3:0:6-3:1:7", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-nexus.d2,3:0:6-3:1:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,3:0:6-3:1:7", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-nexus.d2,3:0:6-3:1:7", + "key": { + "range": "TestCompile/patterns/edge-nexus.d2,3:0:6-3:1:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,3:0:6-3:1:7", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "nexus", + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "value": [ + { + "string": "nexus", + "raw_string": "nexus" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "value": [ + { + "string": "nexus", + "raw_string": "nexus" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:10:18", + "src": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:1:9", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:1:9", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "value": [ + { + "string": "nexus", + "raw_string": "nexus" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:10:18", + "edges": [ + { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:10:18", + "src": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:1:9", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:1:9", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "value": [ + { + "string": "nexus", + "raw_string": "nexus" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": [ + { + "edge_id": { + "src_path": [ + "a" + ], + "src_arrow": false, + "dst_path": [ + "nexus" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:10:18", + "src": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:1:9", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:1:9", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "value": [ + { + "string": "nexus", + "raw_string": "nexus" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:10:18", + "edges": [ + { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:10:18", + "src": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:1:9", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:1:9", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "value": [ + { + "string": "nexus", + "raw_string": "nexus" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "b" + ], + "src_arrow": false, + "dst_path": [ + "nexus" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:10:18", + "src": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:1:9", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:1:9", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "value": [ + { + "string": "nexus", + "raw_string": "nexus" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:10:18", + "edges": [ + { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:10:18", + "src": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:1:9", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:1:9", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "value": [ + { + "string": "nexus", + "raw_string": "nexus" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "c" + ], + "src_arrow": false, + "dst_path": [ + "nexus" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:10:18", + "src": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:1:9", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:1:9", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "value": [ + { + "string": "nexus", + "raw_string": "nexus" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:10:18", + "edges": [ + { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:10:18", + "src": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:1:9", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:1:9", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "value": [ + { + "string": "nexus", + "raw_string": "nexus" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "d" + ], + "src_arrow": false, + "dst_path": [ + "nexus" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:10:18", + "src": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:1:9", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:1:9", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "value": [ + { + "string": "nexus", + "raw_string": "nexus" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:10:18", + "edges": [ + { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:10:18", + "src": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:1:9", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:0:8-4:1:9", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-nexus.d2,4:5:13-4:10:18", + "value": [ + { + "string": "nexus", + "raw_string": "nexus" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + } + ] +} diff --git a/testdata/d2ir/TestCompile/patterns/edge/1.exp.json b/testdata/d2ir/TestCompile/patterns/edge/1.exp.json new file mode 100644 index 000000000..087072d2d --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/edge/1.exp.json @@ -0,0 +1,352 @@ +{ + "fields": [ + { + "name": "animate", + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge/1.d2,0:0:0-0:7:7", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge/1.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/1.d2,0:0:0-0:7:7", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge/1.d2,0:0:0-0:7:7", + "key": { + "range": "TestCompile/patterns/edge/1.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/1.d2,0:0:0-0:7:7", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "animal", + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge/1.d2,1:0:8-1:6:14", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge/1.d2,1:0:8-1:6:14", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/1.d2,1:0:8-1:6:14", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge/1.d2,1:0:8-1:6:14", + "key": { + "range": "TestCompile/patterns/edge/1.d2,1:0:8-1:6:14", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/1.d2,1:0:8-1:6:14", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": [ + { + "edge_id": { + "src_path": [ + "animate" + ], + "src_arrow": false, + "dst_path": [ + "animal" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge/1.d2,2:0:15-2:10:25", + "src": { + "range": "TestCompile/patterns/edge/1.d2,2:0:15-2:3:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/1.d2,2:0:15-2:3:18", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge/1.d2,2:7:22-2:10:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/1.d2,2:7:22-2:10:25", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge/1.d2,2:0:15-2:10:25", + "edges": [ + { + "range": "TestCompile/patterns/edge/1.d2,2:0:15-2:10:25", + "src": { + "range": "TestCompile/patterns/edge/1.d2,2:0:15-2:3:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/1.d2,2:0:15-2:3:18", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge/1.d2,2:7:22-2:10:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/1.d2,2:7:22-2:10:25", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "animal" + ], + "src_arrow": false, + "dst_path": [ + "animate" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge/1.d2,2:0:15-2:10:25", + "src": { + "range": "TestCompile/patterns/edge/1.d2,2:0:15-2:3:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/1.d2,2:0:15-2:3:18", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge/1.d2,2:7:22-2:10:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/1.d2,2:7:22-2:10:25", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge/1.d2,2:0:15-2:10:25", + "edges": [ + { + "range": "TestCompile/patterns/edge/1.d2,2:0:15-2:10:25", + "src": { + "range": "TestCompile/patterns/edge/1.d2,2:0:15-2:3:18", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/1.d2,2:0:15-2:3:18", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge/1.d2,2:7:22-2:10:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/1.d2,2:7:22-2:10:25", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + } + ] +} diff --git a/testdata/d2ir/TestCompile/patterns/edge/2.exp.json b/testdata/d2ir/TestCompile/patterns/edge/2.exp.json new file mode 100644 index 000000000..016f524db --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/edge/2.exp.json @@ -0,0 +1,592 @@ +{ + "fields": [ + { + "name": "shared", + "composite": { + "fields": [ + { + "name": "animate", + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge/2.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge/2.d2,0:0:0-0:14:14", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,0:0:0-0:6:6", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge/2.d2,0:0:0-0:14:14", + "key": { + "range": "TestCompile/patterns/edge/2.d2,0:0:0-0:14:14", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,0:0:0-0:6:6", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "animal", + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge/2.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge/2.d2,1:0:15-1:13:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,1:0:15-1:6:21", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge/2.d2,1:0:15-1:13:28", + "key": { + "range": "TestCompile/patterns/edge/2.d2,1:0:15-1:13:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,1:0:15-1:6:21", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": [ + { + "edge_id": { + "src_path": [ + "animate" + ], + "src_arrow": false, + "dst_path": [ + "animal" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge/2.d2,2:5:34-2:15:44", + "src": { + "range": "TestCompile/patterns/edge/2.d2,2:5:34-2:8:37", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,2:5:34-2:8:37", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge/2.d2,2:12:41-2:15:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,2:12:41-2:15:44", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge/2.d2,2:0:29-2:16:45", + "key": { + "range": "TestCompile/patterns/edge/2.d2,2:0:29-2:3:32", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,2:0:29-2:3:32", + "value": [ + { + "string": "sh*", + "raw_string": "sh*" + } + ], + "pattern": [ + "sh", + "*" + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge/2.d2,2:5:34-2:15:44", + "src": { + "range": "TestCompile/patterns/edge/2.d2,2:5:34-2:8:37", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,2:5:34-2:8:37", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge/2.d2,2:12:41-2:15:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,2:12:41-2:15:44", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "animal" + ], + "src_arrow": false, + "dst_path": [ + "animate" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge/2.d2,2:5:34-2:15:44", + "src": { + "range": "TestCompile/patterns/edge/2.d2,2:5:34-2:8:37", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,2:5:34-2:8:37", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge/2.d2,2:12:41-2:15:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,2:12:41-2:15:44", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge/2.d2,2:0:29-2:16:45", + "key": { + "range": "TestCompile/patterns/edge/2.d2,2:0:29-2:3:32", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,2:0:29-2:3:32", + "value": [ + { + "string": "sh*", + "raw_string": "sh*" + } + ], + "pattern": [ + "sh", + "*" + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge/2.d2,2:5:34-2:15:44", + "src": { + "range": "TestCompile/patterns/edge/2.d2,2:5:34-2:8:37", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,2:5:34-2:8:37", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge/2.d2,2:12:41-2:15:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,2:12:41-2:15:44", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + } + ] + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge/2.d2,0:0:0-0:6:6", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge/2.d2,0:0:0-0:14:14", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,0:0:0-0:6:6", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge/2.d2,0:0:0-0:14:14", + "key": { + "range": "TestCompile/patterns/edge/2.d2,0:0:0-0:14:14", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,0:0:0-0:6:6", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + }, + { + "string": { + "range": "TestCompile/patterns/edge/2.d2,1:0:15-1:6:21", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge/2.d2,1:0:15-1:13:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,1:0:15-1:6:21", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge/2.d2,1:0:15-1:13:28", + "key": { + "range": "TestCompile/patterns/edge/2.d2,1:0:15-1:13:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,1:0:15-1:6:21", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/2.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/patterns/edge/3.exp.json b/testdata/d2ir/TestCompile/patterns/edge/3.exp.json new file mode 100644 index 000000000..a6a0200bc --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/edge/3.exp.json @@ -0,0 +1,672 @@ +{ + "fields": [ + { + "name": "shared", + "composite": { + "fields": [ + { + "name": "animate", + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge/3.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge/3.d2,0:0:0-0:14:14", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,0:0:0-0:6:6", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge/3.d2,0:0:0-0:14:14", + "key": { + "range": "TestCompile/patterns/edge/3.d2,0:0:0-0:14:14", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,0:0:0-0:6:6", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "animal", + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge/3.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge/3.d2,1:0:15-1:13:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,1:0:15-1:6:21", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge/3.d2,1:0:15-1:13:28", + "key": { + "range": "TestCompile/patterns/edge/3.d2,1:0:15-1:13:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,1:0:15-1:6:21", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": [ + { + "edge_id": { + "src_path": [ + "animate" + ], + "src_arrow": false, + "dst_path": [ + "animal" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge/3.d2,2:0:29-2:18:47", + "src": { + "range": "TestCompile/patterns/edge/3.d2,2:0:29-2:7:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,2:0:29-2:3:32", + "value": [ + { + "string": "sh*", + "raw_string": "sh*" + } + ], + "pattern": [ + "sh", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,2:4:33-2:7:36", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge/3.d2,2:11:40-2:18:47", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,2:11:40-2:14:43", + "value": [ + { + "string": "sh*", + "raw_string": "sh*" + } + ], + "pattern": [ + "sh", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,2:15:44-2:18:47", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge/3.d2,2:0:29-2:18:47", + "edges": [ + { + "range": "TestCompile/patterns/edge/3.d2,2:0:29-2:18:47", + "src": { + "range": "TestCompile/patterns/edge/3.d2,2:0:29-2:7:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,2:0:29-2:3:32", + "value": [ + { + "string": "sh*", + "raw_string": "sh*" + } + ], + "pattern": [ + "sh", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,2:4:33-2:7:36", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge/3.d2,2:11:40-2:18:47", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,2:11:40-2:14:43", + "value": [ + { + "string": "sh*", + "raw_string": "sh*" + } + ], + "pattern": [ + "sh", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,2:15:44-2:18:47", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "animal" + ], + "src_arrow": false, + "dst_path": [ + "animate" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge/3.d2,2:0:29-2:18:47", + "src": { + "range": "TestCompile/patterns/edge/3.d2,2:0:29-2:7:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,2:0:29-2:3:32", + "value": [ + { + "string": "sh*", + "raw_string": "sh*" + } + ], + "pattern": [ + "sh", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,2:4:33-2:7:36", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge/3.d2,2:11:40-2:18:47", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,2:11:40-2:14:43", + "value": [ + { + "string": "sh*", + "raw_string": "sh*" + } + ], + "pattern": [ + "sh", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,2:15:44-2:18:47", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge/3.d2,2:0:29-2:18:47", + "edges": [ + { + "range": "TestCompile/patterns/edge/3.d2,2:0:29-2:18:47", + "src": { + "range": "TestCompile/patterns/edge/3.d2,2:0:29-2:7:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,2:0:29-2:3:32", + "value": [ + { + "string": "sh*", + "raw_string": "sh*" + } + ], + "pattern": [ + "sh", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,2:4:33-2:7:36", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge/3.d2,2:11:40-2:18:47", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,2:11:40-2:14:43", + "value": [ + { + "string": "sh*", + "raw_string": "sh*" + } + ], + "pattern": [ + "sh", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,2:15:44-2:18:47", + "value": [ + { + "string": "an*", + "raw_string": "an*" + } + ], + "pattern": [ + "an", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + } + ] + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge/3.d2,0:0:0-0:6:6", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge/3.d2,0:0:0-0:14:14", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,0:0:0-0:6:6", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge/3.d2,0:0:0-0:14:14", + "key": { + "range": "TestCompile/patterns/edge/3.d2,0:0:0-0:14:14", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,0:0:0-0:6:6", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,0:7:7-0:14:14", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + }, + { + "string": { + "range": "TestCompile/patterns/edge/3.d2,1:0:15-1:6:21", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge/3.d2,1:0:15-1:13:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,1:0:15-1:6:21", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge/3.d2,1:0:15-1:13:28", + "key": { + "range": "TestCompile/patterns/edge/3.d2,1:0:15-1:13:28", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,1:0:15-1:6:21", + "value": [ + { + "string": "shared", + "raw_string": "shared" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge/3.d2,1:7:22-1:13:28", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/patterns/errors/glob-edge-glob-index.exp.json b/testdata/d2ir/TestCompile/patterns/errors/glob-edge-glob-index.exp.json new file mode 100644 index 000000000..9735275e6 --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/errors/glob-edge-glob-index.exp.json @@ -0,0 +1,667 @@ +{ + "fields": [ + { + "name": "b", + "references": [ + { + "string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:0:0-0:24:24", + "edges": [ + { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_key": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:19:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:14:14", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:15:15-0:19:19", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:21:21-0:24:24", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": [ + { + "edge_id": { + "src_path": [ + "b" + ], + "src_arrow": false, + "dst_path": [ + "b" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "map": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:21:21-0:24:24", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:15:15-0:19:19", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:19:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:14:14", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:15:15-0:19:19", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:0:0-0:24:24", + "edges": [ + { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_key": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:19:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:14:14", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:15:15-0:19:19", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:21:21-0:24:24", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:14:14", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:19:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:14:14", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:15:15-0:19:19", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:0:0-0:24:24", + "edges": [ + { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_key": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:19:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:14:14", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:15:15-0:19:19", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:21:21-0:24:24", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:0:0-0:24:24", + "edges": [ + { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_key": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:19:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:14:14", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:15:15-0:19:19", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:21:21-0:24:24", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ] +} diff --git a/testdata/d2ir/TestCompile/patterns/escaped.exp.json b/testdata/d2ir/TestCompile/patterns/escaped.exp.json new file mode 100644 index 000000000..27262dd30 --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/escaped.exp.json @@ -0,0 +1,236 @@ +{ + "fields": [ + { + "name": "animal", + "primary": { + "value": { + "range": "TestCompile/patterns/escaped.d2,0:8:8-0:12:12", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/escaped.d2,0:0:0-0:6:6", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/escaped.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/escaped.d2,0:0:0-0:6:6", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/escaped.d2,0:0:0-0:12:12", + "key": { + "range": "TestCompile/patterns/escaped.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/escaped.d2,0:0:0-0:6:6", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/escaped.d2,0:8:8-0:12:12", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + } + } + } + ] + }, + { + "name": "action", + "primary": { + "value": { + "range": "TestCompile/patterns/escaped.d2,1:8:21-1:11:24", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/escaped.d2,1:0:13-1:6:19", + "value": [ + { + "string": "action", + "raw_string": "action" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/escaped.d2,1:0:13-1:6:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/escaped.d2,1:0:13-1:6:19", + "value": [ + { + "string": "action", + "raw_string": "action" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/escaped.d2,1:0:13-1:11:24", + "key": { + "range": "TestCompile/patterns/escaped.d2,1:0:13-1:6:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/escaped.d2,1:0:13-1:6:19", + "value": [ + { + "string": "action", + "raw_string": "action" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/escaped.d2,1:8:21-1:11:24", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + } + } + } + } + ] + }, + { + "name": "a*", + "primary": { + "value": { + "range": "TestCompile/patterns/escaped.d2,2:5:30-2:12:37", + "value": [ + { + "string": "globbed", + "raw_string": "globbed" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/escaped.d2,2:0:25-2:2:27", + "value": [ + { + "string": "a*", + "raw_string": "a\\*" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/escaped.d2,2:0:25-2:2:27", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/escaped.d2,2:0:25-2:2:27", + "value": [ + { + "string": "a*", + "raw_string": "a\\*" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/escaped.d2,2:0:25-2:12:37", + "key": { + "range": "TestCompile/patterns/escaped.d2,2:0:25-2:2:27", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/escaped.d2,2:0:25-2:2:27", + "value": [ + { + "string": "a*", + "raw_string": "a\\*" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/escaped.d2,2:5:30-2:12:37", + "value": [ + { + "string": "globbed", + "raw_string": "globbed" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/patterns/glob-edge-glob-index.exp.json b/testdata/d2ir/TestCompile/patterns/glob-edge-glob-index.exp.json new file mode 100644 index 000000000..76ba3598f --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/glob-edge-glob-index.exp.json @@ -0,0 +1,3945 @@ +{ + "fields": [ + { + "name": "a", + "references": [ + { + "string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:6:6", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:6:6", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:6:6", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + }, + { + "string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:1:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:1:8", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:1:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:6:13", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:1:8", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:1:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:5:12-1:6:13", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:5:12-1:6:13", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:6:13", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:6:13", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:1:8", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:1:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:5:12-1:6:13", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:5:12-1:6:13", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + }, + { + "string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:1:15", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:1:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:1:15", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:6:20", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:1:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:1:15", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:5:19-2:6:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:5:19-2:6:20", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:6:20", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:6:20", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:1:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:1:15", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:5:19-2:6:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:5:19-2:6:20", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "b", + "references": [ + { + "string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:6:6", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:6:6", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:6:6", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + }, + { + "string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:5:12-1:6:13", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:5:12-1:6:13", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:5:12-1:6:13", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:6:13", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:1:8", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:1:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:5:12-1:6:13", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:5:12-1:6:13", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:6:13", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:6:13", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:1:8", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:1:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:5:12-1:6:13", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:5:12-1:6:13", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + }, + { + "string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:5:19-2:6:20", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:5:19-2:6:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:5:19-2:6:20", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:6:20", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:1:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:1:15", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:5:19-2:6:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:5:19-2:6:20", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:6:20", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:6:20", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:1:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:1:15", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:5:19-2:6:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:5:19-2:6:20", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + }, + { + "string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:5:26-3:6:27", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:5:26-3:6:27", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:5:26-3:6:27", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:6:27", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:1:22", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:1:22", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:5:26-3:6:27", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:5:26-3:6:27", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:6:27", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:6:27", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:1:22", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:1:22", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:5:26-3:6:27", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:5:26-3:6:27", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + }, + { + "string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + }, + { + "name": "c", + "references": [ + { + "string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:1:22", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:1:22", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:1:22", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:6:27", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:1:22", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:1:22", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:5:26-3:6:27", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:5:26-3:6:27", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:6:27", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:6:27", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:1:22", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:1:22", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:5:26-3:6:27", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:5:26-3:6:27", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": [ + { + "edge_id": { + "src_path": [ + "a" + ], + "src_arrow": false, + "dst_path": [ + "b" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "map": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:6:6", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:6:6", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:6:6", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + }, + { + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "a" + ], + "src_arrow": false, + "dst_path": [ + "b" + ], + "dst_arrow": true, + "index": 1, + "glob": false + }, + "map": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:6:13", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:1:8", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:1:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:5:12-1:6:13", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:5:12-1:6:13", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:6:13", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:6:13", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:1:8", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:0:7-1:1:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:5:12-1:6:13", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,1:5:12-1:6:13", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + }, + { + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "a" + ], + "src_arrow": false, + "dst_path": [ + "b" + ], + "dst_arrow": true, + "index": 2, + "glob": false + }, + "map": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:6:20", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:1:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:1:15", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:5:19-2:6:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:5:19-2:6:20", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:6:20", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:6:20", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:1:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:0:14-2:1:15", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:5:19-2:6:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,2:5:19-2:6:20", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + }, + { + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "c" + ], + "src_arrow": false, + "dst_path": [ + "b" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "map": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "fill", + "primary": { + "value": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:6:27", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:1:22", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:1:22", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:5:26-3:6:27", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:5:26-3:6:27", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:6:27", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:6:27", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:1:22", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:0:21-3:1:22", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:5:26-3:6:27", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,3:5:26-3:6:27", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + }, + { + "context": { + "edge": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", + "edges": [ + { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", + "src": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + } + ] + } + ] +} diff --git a/testdata/d2ir/TestCompile/patterns/nested/prefix-suffix/3.exp.json b/testdata/d2ir/TestCompile/patterns/nested/prefix-suffix/3.exp.json new file mode 100644 index 000000000..9b5259d95 --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/nested/prefix-suffix/3.exp.json @@ -0,0 +1,997 @@ +{ + "fields": [ + { + "name": "animate", + "composite": { + "fields": [ + { + "name": "constant", + "composite": { + "fields": [ + { + "name": "tinkertinker", + "primary": { + "value": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:33:108-2:40:115", + "value": [ + { + "string": "globbed", + "raw_string": "globbed" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:17:17-0:29:29", + "value": [ + { + "string": "tinkertinker", + "raw_string": "tinkertinker" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:0:0-0:29:29", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:0:0-0:7:7", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:8:8-0:16:16", + "value": [ + { + "string": "constant", + "raw_string": "constant" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:17:17-0:29:29", + "value": [ + { + "string": "tinkertinker", + "raw_string": "tinkertinker" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:0:0-0:35:35", + "key": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:0:0-0:29:29", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:0:0-0:7:7", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:8:8-0:16:16", + "value": [ + { + "string": "constant", + "raw_string": "constant" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:17:17-0:29:29", + "value": [ + { + "string": "tinkertinker", + "raw_string": "tinkertinker" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:31:31-0:35:35", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:8:8-0:16:16", + "value": [ + { + "string": "constant", + "raw_string": "constant" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:0:0-0:29:29", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:0:0-0:7:7", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:8:8-0:16:16", + "value": [ + { + "string": "constant", + "raw_string": "constant" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:17:17-0:29:29", + "value": [ + { + "string": "tinkertinker", + "raw_string": "tinkertinker" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:0:0-0:35:35", + "key": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:0:0-0:29:29", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:0:0-0:7:7", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:8:8-0:16:16", + "value": [ + { + "string": "constant", + "raw_string": "constant" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:17:17-0:29:29", + "value": [ + { + "string": "tinkertinker", + "raw_string": "tinkertinker" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:31:31-0:35:35", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:7:82-2:15:90", + "value": [ + { + "string": "constant", + "raw_string": "constant" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:0:75-2:31:106", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:0:75-2:6:81", + "value": [ + { + "string": "a*n*t*", + "raw_string": "a*n*t*" + } + ], + "pattern": [ + "a", + "*", + "n", + "*", + "t", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:7:82-2:15:90", + "value": [ + { + "string": "constant", + "raw_string": "constant" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:16:91-2:31:106", + "value": [ + { + "string": "t*ink*r*t*inke*", + "raw_string": "t*ink*r*t*inke*" + } + ], + "pattern": [ + "t", + "*", + "ink", + "*", + "r", + "*", + "t", + "*", + "inke", + "*" + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:0:75-2:40:115", + "key": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:0:75-2:31:106", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:0:75-2:6:81", + "value": [ + { + "string": "a*n*t*", + "raw_string": "a*n*t*" + } + ], + "pattern": [ + "a", + "*", + "n", + "*", + "t", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:7:82-2:15:90", + "value": [ + { + "string": "constant", + "raw_string": "constant" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:16:91-2:31:106", + "value": [ + { + "string": "t*ink*r*t*inke*", + "raw_string": "t*ink*r*t*inke*" + } + ], + "pattern": [ + "t", + "*", + "ink", + "*", + "r", + "*", + "t", + "*", + "inke", + "*" + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:33:108-2:40:115", + "value": [ + { + "string": "globbed", + "raw_string": "globbed" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:0:0-0:7:7", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:0:0-0:29:29", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:0:0-0:7:7", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:8:8-0:16:16", + "value": [ + { + "string": "constant", + "raw_string": "constant" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:17:17-0:29:29", + "value": [ + { + "string": "tinkertinker", + "raw_string": "tinkertinker" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:0:0-0:35:35", + "key": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:0:0-0:29:29", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:0:0-0:7:7", + "value": [ + { + "string": "animate", + "raw_string": "animate" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:8:8-0:16:16", + "value": [ + { + "string": "constant", + "raw_string": "constant" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:17:17-0:29:29", + "value": [ + { + "string": "tinkertinker", + "raw_string": "tinkertinker" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,0:31:31-0:35:35", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + } + } + } + ] + }, + { + "name": "astronaut", + "composite": { + "fields": [ + { + "name": "constant", + "composite": { + "fields": [ + { + "name": "thinkerthinker", + "primary": { + "value": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:33:108-2:40:115", + "value": [ + { + "string": "globbed", + "raw_string": "globbed" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:19:55-1:33:69", + "value": [ + { + "string": "thinkerthinker", + "raw_string": "thinkerthinker" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:0:36-1:33:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:0:36-1:9:45", + "value": [ + { + "string": "astronaut", + "raw_string": "astronaut" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:10:46-1:18:54", + "value": [ + { + "string": "constant", + "raw_string": "constant" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:19:55-1:33:69", + "value": [ + { + "string": "thinkerthinker", + "raw_string": "thinkerthinker" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:0:36-1:38:74", + "key": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:0:36-1:33:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:0:36-1:9:45", + "value": [ + { + "string": "astronaut", + "raw_string": "astronaut" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:10:46-1:18:54", + "value": [ + { + "string": "constant", + "raw_string": "constant" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:19:55-1:33:69", + "value": [ + { + "string": "thinkerthinker", + "raw_string": "thinkerthinker" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:35:71-1:38:74", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:10:46-1:18:54", + "value": [ + { + "string": "constant", + "raw_string": "constant" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:0:36-1:33:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:0:36-1:9:45", + "value": [ + { + "string": "astronaut", + "raw_string": "astronaut" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:10:46-1:18:54", + "value": [ + { + "string": "constant", + "raw_string": "constant" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:19:55-1:33:69", + "value": [ + { + "string": "thinkerthinker", + "raw_string": "thinkerthinker" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:0:36-1:38:74", + "key": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:0:36-1:33:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:0:36-1:9:45", + "value": [ + { + "string": "astronaut", + "raw_string": "astronaut" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:10:46-1:18:54", + "value": [ + { + "string": "constant", + "raw_string": "constant" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:19:55-1:33:69", + "value": [ + { + "string": "thinkerthinker", + "raw_string": "thinkerthinker" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:35:71-1:38:74", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + } + } + } + }, + { + "string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:7:82-2:15:90", + "value": [ + { + "string": "constant", + "raw_string": "constant" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:0:75-2:31:106", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:0:75-2:6:81", + "value": [ + { + "string": "a*n*t*", + "raw_string": "a*n*t*" + } + ], + "pattern": [ + "a", + "*", + "n", + "*", + "t", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:7:82-2:15:90", + "value": [ + { + "string": "constant", + "raw_string": "constant" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:16:91-2:31:106", + "value": [ + { + "string": "t*ink*r*t*inke*", + "raw_string": "t*ink*r*t*inke*" + } + ], + "pattern": [ + "t", + "*", + "ink", + "*", + "r", + "*", + "t", + "*", + "inke", + "*" + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:0:75-2:40:115", + "key": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:0:75-2:31:106", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:0:75-2:6:81", + "value": [ + { + "string": "a*n*t*", + "raw_string": "a*n*t*" + } + ], + "pattern": [ + "a", + "*", + "n", + "*", + "t", + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:7:82-2:15:90", + "value": [ + { + "string": "constant", + "raw_string": "constant" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:16:91-2:31:106", + "value": [ + { + "string": "t*ink*r*t*inke*", + "raw_string": "t*ink*r*t*inke*" + } + ], + "pattern": [ + "t", + "*", + "ink", + "*", + "r", + "*", + "t", + "*", + "inke", + "*" + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,2:33:108-2:40:115", + "value": [ + { + "string": "globbed", + "raw_string": "globbed" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:0:36-1:9:45", + "value": [ + { + "string": "astronaut", + "raw_string": "astronaut" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:0:36-1:33:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:0:36-1:9:45", + "value": [ + { + "string": "astronaut", + "raw_string": "astronaut" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:10:46-1:18:54", + "value": [ + { + "string": "constant", + "raw_string": "constant" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:19:55-1:33:69", + "value": [ + { + "string": "thinkerthinker", + "raw_string": "thinkerthinker" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:0:36-1:38:74", + "key": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:0:36-1:33:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:0:36-1:9:45", + "value": [ + { + "string": "astronaut", + "raw_string": "astronaut" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:10:46-1:18:54", + "value": [ + { + "string": "constant", + "raw_string": "constant" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:19:55-1:33:69", + "value": [ + { + "string": "thinkerthinker", + "raw_string": "thinkerthinker" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/nested/prefix-suffix/3.d2,1:35:71-1:38:74", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/patterns/prefix-suffix.exp.json b/testdata/d2ir/TestCompile/patterns/prefix-suffix.exp.json new file mode 100644 index 000000000..a71fb970b --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/prefix-suffix.exp.json @@ -0,0 +1,159 @@ +{ + "fields": [ + { + "name": "tinker", + "primary": { + "value": { + "range": "TestCompile/patterns/prefix-suffix.d2,2:5:31-2:12:38", + "value": [ + { + "string": "globbed", + "raw_string": "globbed" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/prefix-suffix.d2,0:0:0-0:6:6", + "value": [ + { + "string": "tinker", + "raw_string": "tinker" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/prefix-suffix.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/prefix-suffix.d2,0:0:0-0:6:6", + "value": [ + { + "string": "tinker", + "raw_string": "tinker" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/prefix-suffix.d2,0:0:0-0:12:12", + "key": { + "range": "TestCompile/patterns/prefix-suffix.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/prefix-suffix.d2,0:0:0-0:6:6", + "value": [ + { + "string": "tinker", + "raw_string": "tinker" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/prefix-suffix.d2,0:8:8-0:12:12", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + } + } + } + ] + }, + { + "name": "thinker", + "primary": { + "value": { + "range": "TestCompile/patterns/prefix-suffix.d2,2:5:31-2:12:38", + "value": [ + { + "string": "globbed", + "raw_string": "globbed" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/prefix-suffix.d2,1:0:13-1:7:20", + "value": [ + { + "string": "thinker", + "raw_string": "thinker" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/prefix-suffix.d2,1:0:13-1:7:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/prefix-suffix.d2,1:0:13-1:7:20", + "value": [ + { + "string": "thinker", + "raw_string": "thinker" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/prefix-suffix.d2,1:0:13-1:12:25", + "key": { + "range": "TestCompile/patterns/prefix-suffix.d2,1:0:13-1:7:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/prefix-suffix.d2,1:0:13-1:7:20", + "value": [ + { + "string": "thinker", + "raw_string": "thinker" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/prefix-suffix.d2,1:9:22-1:12:25", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/patterns/prefix-suffix/2.exp.json b/testdata/d2ir/TestCompile/patterns/prefix-suffix/2.exp.json new file mode 100644 index 000000000..175299dad --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/prefix-suffix/2.exp.json @@ -0,0 +1,159 @@ +{ + "fields": [ + { + "name": "tinker", + "primary": { + "value": { + "range": "TestCompile/patterns/prefix-suffix/2.d2,2:9:35-2:16:42", + "value": [ + { + "string": "globbed", + "raw_string": "globbed" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/prefix-suffix/2.d2,0:0:0-0:6:6", + "value": [ + { + "string": "tinker", + "raw_string": "tinker" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/prefix-suffix/2.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/prefix-suffix/2.d2,0:0:0-0:6:6", + "value": [ + { + "string": "tinker", + "raw_string": "tinker" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/prefix-suffix/2.d2,0:0:0-0:12:12", + "key": { + "range": "TestCompile/patterns/prefix-suffix/2.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/prefix-suffix/2.d2,0:0:0-0:6:6", + "value": [ + { + "string": "tinker", + "raw_string": "tinker" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/prefix-suffix/2.d2,0:8:8-0:12:12", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + } + } + } + ] + }, + { + "name": "thinker", + "primary": { + "value": { + "range": "TestCompile/patterns/prefix-suffix/2.d2,2:9:35-2:16:42", + "value": [ + { + "string": "globbed", + "raw_string": "globbed" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/prefix-suffix/2.d2,1:0:13-1:7:20", + "value": [ + { + "string": "thinker", + "raw_string": "thinker" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/prefix-suffix/2.d2,1:0:13-1:7:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/prefix-suffix/2.d2,1:0:13-1:7:20", + "value": [ + { + "string": "thinker", + "raw_string": "thinker" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/prefix-suffix/2.d2,1:0:13-1:12:25", + "key": { + "range": "TestCompile/patterns/prefix-suffix/2.d2,1:0:13-1:7:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/prefix-suffix/2.d2,1:0:13-1:7:20", + "value": [ + { + "string": "thinker", + "raw_string": "thinker" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/prefix-suffix/2.d2,1:9:22-1:12:25", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/patterns/prefix-suffix/3.exp.json b/testdata/d2ir/TestCompile/patterns/prefix-suffix/3.exp.json new file mode 100644 index 000000000..1504168b9 --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/prefix-suffix/3.exp.json @@ -0,0 +1,159 @@ +{ + "fields": [ + { + "name": "tinkertinker", + "primary": { + "value": { + "range": "TestCompile/patterns/prefix-suffix/3.d2,2:17:56-2:24:63", + "value": [ + { + "string": "globbed", + "raw_string": "globbed" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/prefix-suffix/3.d2,0:0:0-0:12:12", + "value": [ + { + "string": "tinkertinker", + "raw_string": "tinkertinker" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/prefix-suffix/3.d2,0:0:0-0:12:12", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/prefix-suffix/3.d2,0:0:0-0:12:12", + "value": [ + { + "string": "tinkertinker", + "raw_string": "tinkertinker" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/prefix-suffix/3.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/prefix-suffix/3.d2,0:0:0-0:12:12", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/prefix-suffix/3.d2,0:0:0-0:12:12", + "value": [ + { + "string": "tinkertinker", + "raw_string": "tinkertinker" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/prefix-suffix/3.d2,0:14:14-0:18:18", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + } + } + } + ] + }, + { + "name": "thinkerthinker", + "primary": { + "value": { + "range": "TestCompile/patterns/prefix-suffix/3.d2,2:17:56-2:24:63", + "value": [ + { + "string": "globbed", + "raw_string": "globbed" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/prefix-suffix/3.d2,1:0:19-1:14:33", + "value": [ + { + "string": "thinkerthinker", + "raw_string": "thinkerthinker" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/prefix-suffix/3.d2,1:0:19-1:14:33", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/prefix-suffix/3.d2,1:0:19-1:14:33", + "value": [ + { + "string": "thinkerthinker", + "raw_string": "thinkerthinker" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/prefix-suffix/3.d2,1:0:19-1:19:38", + "key": { + "range": "TestCompile/patterns/prefix-suffix/3.d2,1:0:19-1:14:33", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/prefix-suffix/3.d2,1:0:19-1:14:33", + "value": [ + { + "string": "thinkerthinker", + "raw_string": "thinkerthinker" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/prefix-suffix/3.d2,1:16:35-1:19:38", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/patterns/prefix.exp.json b/testdata/d2ir/TestCompile/patterns/prefix.exp.json new file mode 100644 index 000000000..62dec6cc3 --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/prefix.exp.json @@ -0,0 +1,159 @@ +{ + "fields": [ + { + "name": "animal", + "primary": { + "value": { + "range": "TestCompile/patterns/prefix.d2,2:4:29-2:11:36", + "value": [ + { + "string": "globbed", + "raw_string": "globbed" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/prefix.d2,0:0:0-0:6:6", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/prefix.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/prefix.d2,0:0:0-0:6:6", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/prefix.d2,0:0:0-0:12:12", + "key": { + "range": "TestCompile/patterns/prefix.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/prefix.d2,0:0:0-0:6:6", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/prefix.d2,0:8:8-0:12:12", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + } + } + } + ] + }, + { + "name": "action", + "primary": { + "value": { + "range": "TestCompile/patterns/prefix.d2,2:4:29-2:11:36", + "value": [ + { + "string": "globbed", + "raw_string": "globbed" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/prefix.d2,1:0:13-1:6:19", + "value": [ + { + "string": "action", + "raw_string": "action" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/prefix.d2,1:0:13-1:6:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/prefix.d2,1:0:13-1:6:19", + "value": [ + { + "string": "action", + "raw_string": "action" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/prefix.d2,1:0:13-1:11:24", + "key": { + "range": "TestCompile/patterns/prefix.d2,1:0:13-1:6:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/prefix.d2,1:0:13-1:6:19", + "value": [ + { + "string": "action", + "raw_string": "action" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/prefix.d2,1:8:21-1:11:24", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/patterns/reserved.exp.json b/testdata/d2ir/TestCompile/patterns/reserved.exp.json new file mode 100644 index 000000000..01fb1938f --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/reserved.exp.json @@ -0,0 +1,1284 @@ +{ + "fields": [ + { + "name": "vars", + "composite": { + "fields": [ + { + "name": "d2-config", + "composite": { + "fields": [ + { + "name": "layout-engine", + "primary": { + "value": { + "range": "TestCompile/patterns/reserved.d2,2:19:42-2:22:45", + "value": [ + { + "string": "elk", + "raw_string": "elk" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/reserved.d2,2:4:27-2:17:40", + "value": [ + { + "string": "layout-engine", + "raw_string": "layout-engine" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/reserved.d2,2:4:27-2:17:40", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,2:4:27-2:17:40", + "value": [ + { + "string": "layout-engine", + "raw_string": "layout-engine" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/reserved.d2,2:4:27-2:22:45", + "key": { + "range": "TestCompile/patterns/reserved.d2,2:4:27-2:17:40", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,2:4:27-2:17:40", + "value": [ + { + "string": "layout-engine", + "raw_string": "layout-engine" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,2:19:42-2:22:45", + "value": [ + { + "string": "elk", + "raw_string": "elk" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/reserved.d2,1:2:10-1:11:19", + "value": [ + { + "string": "d2-config", + "raw_string": "d2-config" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/reserved.d2,1:2:10-1:11:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,1:2:10-1:11:19", + "value": [ + { + "string": "d2-config", + "raw_string": "d2-config" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/reserved.d2,1:2:10-3:3:49", + "key": { + "range": "TestCompile/patterns/reserved.d2,1:2:10-1:11:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,1:2:10-1:11:19", + "value": [ + { + "string": "d2-config", + "raw_string": "d2-config" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/reserved.d2,1:13:21-3:3:49", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/reserved.d2,2:4:27-2:22:45", + "key": { + "range": "TestCompile/patterns/reserved.d2,2:4:27-2:17:40", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,2:4:27-2:17:40", + "value": [ + { + "string": "layout-engine", + "raw_string": "layout-engine" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,2:19:42-2:22:45", + "value": [ + { + "string": "elk", + "raw_string": "elk" + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/reserved.d2,0:0:0-0:4:4", + "value": [ + { + "string": "vars", + "raw_string": "vars" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/reserved.d2,0:0:0-0:4:4", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,0:0:0-0:4:4", + "value": [ + { + "string": "vars", + "raw_string": "vars" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/reserved.d2,0:0:0-4:1:51", + "key": { + "range": "TestCompile/patterns/reserved.d2,0:0:0-0:4:4", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,0:0:0-0:4:4", + "value": [ + { + "string": "vars", + "raw_string": "vars" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/reserved.d2,0:6:6-4:1:51", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/reserved.d2,1:2:10-3:3:49", + "key": { + "range": "TestCompile/patterns/reserved.d2,1:2:10-1:11:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,1:2:10-1:11:19", + "value": [ + { + "string": "d2-config", + "raw_string": "d2-config" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/reserved.d2,1:13:21-3:3:49", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/reserved.d2,2:4:27-2:22:45", + "key": { + "range": "TestCompile/patterns/reserved.d2,2:4:27-2:17:40", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,2:4:27-2:17:40", + "value": [ + { + "string": "layout-engine", + "raw_string": "layout-engine" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,2:19:42-2:22:45", + "value": [ + { + "string": "elk", + "raw_string": "elk" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + }, + { + "name": "Spiderman 1", + "references": [ + { + "string": { + "range": "TestCompile/patterns/reserved.d2,6:0:53-6:11:64", + "value": [ + { + "string": "Spiderman 1", + "raw_string": "Spiderman 1" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/reserved.d2,6:0:53-6:11:64", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,6:0:53-6:11:64", + "value": [ + { + "string": "Spiderman 1", + "raw_string": "Spiderman 1" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/reserved.d2,6:0:53-6:11:64", + "key": { + "range": "TestCompile/patterns/reserved.d2,6:0:53-6:11:64", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,6:0:53-6:11:64", + "value": [ + { + "string": "Spiderman 1", + "raw_string": "Spiderman 1" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "Spiderman 2", + "references": [ + { + "string": { + "range": "TestCompile/patterns/reserved.d2,7:0:65-7:11:76", + "value": [ + { + "string": "Spiderman 2", + "raw_string": "Spiderman 2" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/reserved.d2,7:0:65-7:11:76", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,7:0:65-7:11:76", + "value": [ + { + "string": "Spiderman 2", + "raw_string": "Spiderman 2" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/reserved.d2,7:0:65-7:11:76", + "key": { + "range": "TestCompile/patterns/reserved.d2,7:0:65-7:11:76", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,7:0:65-7:11:76", + "value": [ + { + "string": "Spiderman 2", + "raw_string": "Spiderman 2" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "Spiderman 3", + "references": [ + { + "string": { + "range": "TestCompile/patterns/reserved.d2,8:0:77-8:11:88", + "value": [ + { + "string": "Spiderman 3", + "raw_string": "Spiderman 3" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/reserved.d2,8:0:77-8:11:88", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,8:0:77-8:11:88", + "value": [ + { + "string": "Spiderman 3", + "raw_string": "Spiderman 3" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/reserved.d2,8:0:77-8:11:88", + "key": { + "range": "TestCompile/patterns/reserved.d2,8:0:77-8:11:88", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,8:0:77-8:11:88", + "value": [ + { + "string": "Spiderman 3", + "raw_string": "Spiderman 3" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": [ + { + "edge_id": { + "src_path": [ + "Spiderman 1" + ], + "src_arrow": false, + "dst_path": [ + "Spiderman 2" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "primary": { + "value": { + "range": "TestCompile/patterns/reserved.d2,10:8:98-10:13:103", + "value": [ + { + "string": "arrow", + "raw_string": "arrow" + } + ] + } + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:6:96", + "src": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:13:103", + "edges": [ + { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:6:96", + "src": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:8:98-10:13:103", + "value": [ + { + "string": "arrow", + "raw_string": "arrow" + } + ] + } + } + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "Spiderman 1" + ], + "src_arrow": false, + "dst_path": [ + "Spiderman 3" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "primary": { + "value": { + "range": "TestCompile/patterns/reserved.d2,10:8:98-10:13:103", + "value": [ + { + "string": "arrow", + "raw_string": "arrow" + } + ] + } + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:6:96", + "src": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:13:103", + "edges": [ + { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:6:96", + "src": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:8:98-10:13:103", + "value": [ + { + "string": "arrow", + "raw_string": "arrow" + } + ] + } + } + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "Spiderman 2" + ], + "src_arrow": false, + "dst_path": [ + "Spiderman 1" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "primary": { + "value": { + "range": "TestCompile/patterns/reserved.d2,10:8:98-10:13:103", + "value": [ + { + "string": "arrow", + "raw_string": "arrow" + } + ] + } + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:6:96", + "src": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:13:103", + "edges": [ + { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:6:96", + "src": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:8:98-10:13:103", + "value": [ + { + "string": "arrow", + "raw_string": "arrow" + } + ] + } + } + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "Spiderman 2" + ], + "src_arrow": false, + "dst_path": [ + "Spiderman 3" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "primary": { + "value": { + "range": "TestCompile/patterns/reserved.d2,10:8:98-10:13:103", + "value": [ + { + "string": "arrow", + "raw_string": "arrow" + } + ] + } + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:6:96", + "src": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:13:103", + "edges": [ + { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:6:96", + "src": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:8:98-10:13:103", + "value": [ + { + "string": "arrow", + "raw_string": "arrow" + } + ] + } + } + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "Spiderman 3" + ], + "src_arrow": false, + "dst_path": [ + "Spiderman 1" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "primary": { + "value": { + "range": "TestCompile/patterns/reserved.d2,10:8:98-10:13:103", + "value": [ + { + "string": "arrow", + "raw_string": "arrow" + } + ] + } + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:6:96", + "src": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:13:103", + "edges": [ + { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:6:96", + "src": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:8:98-10:13:103", + "value": [ + { + "string": "arrow", + "raw_string": "arrow" + } + ] + } + } + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "Spiderman 3" + ], + "src_arrow": false, + "dst_path": [ + "Spiderman 2" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "primary": { + "value": { + "range": "TestCompile/patterns/reserved.d2,10:8:98-10:13:103", + "value": [ + { + "string": "arrow", + "raw_string": "arrow" + } + ] + } + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:6:96", + "src": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:13:103", + "edges": [ + { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:6:96", + "src": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:0:90-10:1:91", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:5:95-10:6:96", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/reserved.d2,10:8:98-10:13:103", + "value": [ + { + "string": "arrow", + "raw_string": "arrow" + } + ] + } + } + } + } + } + ] + } + ] +} diff --git a/testdata/d2ir/TestCompile/patterns/scenarios.exp.json b/testdata/d2ir/TestCompile/patterns/scenarios.exp.json new file mode 100644 index 000000000..4fdd38d3b --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/scenarios.exp.json @@ -0,0 +1,3863 @@ +{ + "fields": [ + { + "name": "scenarios", + "primary": { + "value": { + "range": "TestCompile/patterns/scenarios.d2,16:4:57-16:13:66", + "value": [ + { + "string": "something", + "raw_string": "something" + } + ] + } + }, + "composite": { + "fields": [ + { + "name": "meow", + "primary": { + "value": { + "range": "TestCompile/patterns/scenarios.d2,16:4:57-16:13:66", + "value": [ + { + "string": "something", + "raw_string": "something" + } + ] + } + }, + "composite": { + "fields": [ + { + "name": "e", + "primary": { + "value": { + "range": "TestCompile/patterns/scenarios.d2,16:4:57-16:13:66", + "value": [ + { + "string": "something", + "raw_string": "something" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/scenarios.d2,4:1:26-4:2:27", + "value": [ + { + "string": "e", + "raw_string": "e" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/scenarios.d2,4:1:26-4:2:27", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,4:1:26-4:2:27", + "value": [ + { + "string": "e", + "raw_string": "e" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/scenarios.d2,4:1:26-4:2:27", + "key": { + "range": "TestCompile/patterns/scenarios.d2,4:1:26-4:2:27", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,4:1:26-4:2:27", + "value": [ + { + "string": "e", + "raw_string": "e" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "f", + "primary": { + "value": { + "range": "TestCompile/patterns/scenarios.d2,16:4:57-16:13:66", + "value": [ + { + "string": "something", + "raw_string": "something" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/scenarios.d2,5:1:29-5:2:30", + "value": [ + { + "string": "f", + "raw_string": "f" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/scenarios.d2,5:1:29-5:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,5:1:29-5:2:30", + "value": [ + { + "string": "f", + "raw_string": "f" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/scenarios.d2,5:1:29-5:2:30", + "key": { + "range": "TestCompile/patterns/scenarios.d2,5:1:29-5:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,5:1:29-5:2:30", + "value": [ + { + "string": "f", + "raw_string": "f" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "g", + "primary": { + "value": { + "range": "TestCompile/patterns/scenarios.d2,16:4:57-16:13:66", + "value": [ + { + "string": "something", + "raw_string": "something" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/scenarios.d2,6:1:32-6:2:33", + "value": [ + { + "string": "g", + "raw_string": "g" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/scenarios.d2,6:1:32-6:2:33", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,6:1:32-6:2:33", + "value": [ + { + "string": "g", + "raw_string": "g" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/scenarios.d2,6:1:32-6:2:33", + "key": { + "range": "TestCompile/patterns/scenarios.d2,6:1:32-6:2:33", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,6:1:32-6:2:33", + "value": [ + { + "string": "g", + "raw_string": "g" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "h", + "primary": { + "value": { + "range": "TestCompile/patterns/scenarios.d2,16:4:57-16:13:66", + "value": [ + { + "string": "something", + "raw_string": "something" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/scenarios.d2,7:1:35-7:2:36", + "value": [ + { + "string": "h", + "raw_string": "h" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/scenarios.d2,7:1:35-7:2:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,7:1:35-7:2:36", + "value": [ + { + "string": "h", + "raw_string": "h" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/scenarios.d2,7:1:35-7:2:36", + "key": { + "range": "TestCompile/patterns/scenarios.d2,7:1:35-7:2:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,7:1:35-7:2:36", + "value": [ + { + "string": "h", + "raw_string": "h" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/scenarios.d2,3:2:17-3:6:21", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/scenarios.d2,3:2:17-3:6:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,3:2:17-3:6:21", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/scenarios.d2,3:2:17-8:3:40", + "key": { + "range": "TestCompile/patterns/scenarios.d2,3:2:17-3:6:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,3:2:17-3:6:21", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/scenarios.d2,3:8:23-8:3:40", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/scenarios.d2,4:1:26-4:2:27", + "key": { + "range": "TestCompile/patterns/scenarios.d2,4:1:26-4:2:27", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,4:1:26-4:2:27", + "value": [ + { + "string": "e", + "raw_string": "e" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "TestCompile/patterns/scenarios.d2,5:1:29-5:2:30", + "key": { + "range": "TestCompile/patterns/scenarios.d2,5:1:29-5:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,5:1:29-5:2:30", + "value": [ + { + "string": "f", + "raw_string": "f" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "TestCompile/patterns/scenarios.d2,6:1:32-6:2:33", + "key": { + "range": "TestCompile/patterns/scenarios.d2,6:1:32-6:2:33", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,6:1:32-6:2:33", + "value": [ + { + "string": "g", + "raw_string": "g" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "TestCompile/patterns/scenarios.d2,7:1:35-7:2:36", + "key": { + "range": "TestCompile/patterns/scenarios.d2,7:1:35-7:2:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,7:1:35-7:2:36", + "value": [ + { + "string": "h", + "raw_string": "h" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/scenarios.d2,2:0:2-2:9:11", + "value": [ + { + "string": "scenarios", + "raw_string": "scenarios" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/scenarios.d2,2:0:2-2:9:11", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,2:0:2-2:9:11", + "value": [ + { + "string": "scenarios", + "raw_string": "scenarios" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/scenarios.d2,2:0:2-9:1:42", + "key": { + "range": "TestCompile/patterns/scenarios.d2,2:0:2-2:9:11", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,2:0:2-2:9:11", + "value": [ + { + "string": "scenarios", + "raw_string": "scenarios" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/scenarios.d2,2:11:13-9:1:42", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/scenarios.d2,3:2:17-8:3:40", + "key": { + "range": "TestCompile/patterns/scenarios.d2,3:2:17-3:6:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,3:2:17-3:6:21", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/scenarios.d2,3:8:23-8:3:40", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/scenarios.d2,4:1:26-4:2:27", + "key": { + "range": "TestCompile/patterns/scenarios.d2,4:1:26-4:2:27", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,4:1:26-4:2:27", + "value": [ + { + "string": "e", + "raw_string": "e" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "TestCompile/patterns/scenarios.d2,5:1:29-5:2:30", + "key": { + "range": "TestCompile/patterns/scenarios.d2,5:1:29-5:2:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,5:1:29-5:2:30", + "value": [ + { + "string": "f", + "raw_string": "f" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "TestCompile/patterns/scenarios.d2,6:1:32-6:2:33", + "key": { + "range": "TestCompile/patterns/scenarios.d2,6:1:32-6:2:33", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,6:1:32-6:2:33", + "value": [ + { + "string": "g", + "raw_string": "g" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "TestCompile/patterns/scenarios.d2,7:1:35-7:2:36", + "key": { + "range": "TestCompile/patterns/scenarios.d2,7:1:35-7:2:36", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,7:1:35-7:2:36", + "value": [ + { + "string": "h", + "raw_string": "h" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + } + } + ] + }, + { + "name": "a", + "primary": { + "value": { + "range": "TestCompile/patterns/scenarios.d2,16:4:57-16:13:66", + "value": [ + { + "string": "something", + "raw_string": "something" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/scenarios.d2,11:0:44-11:1:45", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/scenarios.d2,11:0:44-11:1:45", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,11:0:44-11:1:45", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/scenarios.d2,11:0:44-11:1:45", + "key": { + "range": "TestCompile/patterns/scenarios.d2,11:0:44-11:1:45", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,11:0:44-11:1:45", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "b", + "primary": { + "value": { + "range": "TestCompile/patterns/scenarios.d2,16:4:57-16:13:66", + "value": [ + { + "string": "something", + "raw_string": "something" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/scenarios.d2,12:0:46-12:1:47", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/scenarios.d2,12:0:46-12:1:47", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,12:0:46-12:1:47", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/scenarios.d2,12:0:46-12:1:47", + "key": { + "range": "TestCompile/patterns/scenarios.d2,12:0:46-12:1:47", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,12:0:46-12:1:47", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "c", + "primary": { + "value": { + "range": "TestCompile/patterns/scenarios.d2,16:4:57-16:13:66", + "value": [ + { + "string": "something", + "raw_string": "something" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/scenarios.d2,13:0:48-13:1:49", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/scenarios.d2,13:0:48-13:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,13:0:48-13:1:49", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/scenarios.d2,13:0:48-13:1:49", + "key": { + "range": "TestCompile/patterns/scenarios.d2,13:0:48-13:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,13:0:48-13:1:49", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "name": "d", + "primary": { + "value": { + "range": "TestCompile/patterns/scenarios.d2,16:4:57-16:13:66", + "value": [ + { + "string": "something", + "raw_string": "something" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/scenarios.d2,14:0:50-14:1:51", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/scenarios.d2,14:0:50-14:1:51", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,14:0:50-14:1:51", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/scenarios.d2,14:0:50-14:1:51", + "key": { + "range": "TestCompile/patterns/scenarios.d2,14:0:50-14:1:51", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,14:0:50-14:1:51", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + } + ] + } + ], + "edges": [ + { + "edge_id": { + "src_path": [ + "scenarios", + "meow", + "e" + ], + "src_arrow": false, + "dst_path": [ + "scenarios", + "meow", + "f" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "scenarios", + "meow", + "e" + ], + "src_arrow": false, + "dst_path": [ + "scenarios", + "meow", + "g" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "scenarios", + "meow", + "e" + ], + "src_arrow": false, + "dst_path": [ + "scenarios", + "meow", + "h" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "scenarios", + "meow", + "f" + ], + "src_arrow": false, + "dst_path": [ + "scenarios", + "meow", + "e" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "scenarios", + "meow", + "f" + ], + "src_arrow": false, + "dst_path": [ + "scenarios", + "meow", + "g" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "scenarios", + "meow", + "f" + ], + "src_arrow": false, + "dst_path": [ + "scenarios", + "meow", + "h" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "scenarios", + "meow", + "g" + ], + "src_arrow": false, + "dst_path": [ + "scenarios", + "meow", + "e" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "scenarios", + "meow", + "g" + ], + "src_arrow": false, + "dst_path": [ + "scenarios", + "meow", + "f" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "scenarios", + "meow", + "g" + ], + "src_arrow": false, + "dst_path": [ + "scenarios", + "meow", + "h" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "scenarios", + "meow", + "h" + ], + "src_arrow": false, + "dst_path": [ + "scenarios", + "meow", + "e" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "scenarios", + "meow", + "h" + ], + "src_arrow": false, + "dst_path": [ + "scenarios", + "meow", + "f" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "scenarios", + "meow", + "h" + ], + "src_arrow": false, + "dst_path": [ + "scenarios", + "meow", + "g" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "a" + ], + "src_arrow": false, + "dst_path": [ + "b" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "a" + ], + "src_arrow": false, + "dst_path": [ + "c" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "a" + ], + "src_arrow": false, + "dst_path": [ + "d" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "b" + ], + "src_arrow": false, + "dst_path": [ + "a" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "b" + ], + "src_arrow": false, + "dst_path": [ + "c" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "b" + ], + "src_arrow": false, + "dst_path": [ + "d" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "c" + ], + "src_arrow": false, + "dst_path": [ + "a" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "c" + ], + "src_arrow": false, + "dst_path": [ + "b" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "c" + ], + "src_arrow": false, + "dst_path": [ + "d" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "d" + ], + "src_arrow": false, + "dst_path": [ + "a" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "d" + ], + "src_arrow": false, + "dst_path": [ + "b" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + }, + { + "edge_id": { + "src_path": [ + "d" + ], + "src_arrow": false, + "dst_path": [ + "c" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "edges": [ + { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:8:75", + "src": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:0:67-17:2:69", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/scenarios.d2,17:6:73-17:8:75", + "value": [ + { + "string": "**", + "raw_string": "**" + } + ], + "pattern": [ + "*", + "", + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + } + ] + } + ] +} diff --git a/testdata/d2ir/TestCompile/patterns/suffix.exp.json b/testdata/d2ir/TestCompile/patterns/suffix.exp.json new file mode 100644 index 000000000..40da3b5a1 --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/suffix.exp.json @@ -0,0 +1,159 @@ +{ + "fields": [ + { + "name": "animal", + "primary": { + "value": { + "range": "TestCompile/patterns/suffix.d2,2:4:30-2:11:37", + "value": [ + { + "string": "globbed", + "raw_string": "globbed" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/suffix.d2,0:0:0-0:6:6", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/suffix.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/suffix.d2,0:0:0-0:6:6", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/suffix.d2,0:0:0-0:12:12", + "key": { + "range": "TestCompile/patterns/suffix.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/suffix.d2,0:0:0-0:6:6", + "value": [ + { + "string": "animal", + "raw_string": "animal" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/suffix.d2,0:8:8-0:12:12", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + } + } + } + ] + }, + { + "name": "jingle", + "primary": { + "value": { + "range": "TestCompile/patterns/suffix.d2,2:4:30-2:11:37", + "value": [ + { + "string": "globbed", + "raw_string": "globbed" + } + ] + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/suffix.d2,1:0:13-1:6:19", + "value": [ + { + "string": "jingle", + "raw_string": "jingle" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/suffix.d2,1:0:13-1:6:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/suffix.d2,1:0:13-1:6:19", + "value": [ + { + "string": "jingle", + "raw_string": "jingle" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/suffix.d2,1:0:13-1:12:25", + "key": { + "range": "TestCompile/patterns/suffix.d2,1:0:13-1:6:19", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/suffix.d2,1:0:13-1:6:19", + "value": [ + { + "string": "jingle", + "raw_string": "jingle" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/patterns/suffix.d2,1:8:21-1:12:25", + "value": [ + { + "string": "loud", + "raw_string": "loud" + } + ] + } + } + } + } + } + ] + } + ], + "edges": null +} diff --git a/testdata/d2ir/TestCompile/scenarios/edge.exp.json b/testdata/d2ir/TestCompile/scenarios/edge.exp.json index 37f6f502a..c0ef78879 100644 --- a/testdata/d2ir/TestCompile/scenarios/edge.exp.json +++ b/testdata/d2ir/TestCompile/scenarios/edge.exp.json @@ -776,7 +776,8 @@ "b" ], "dst_arrow": true, - "index": 0 + "index": 0, + "glob": false }, "map": { "fields": [ @@ -1668,7 +1669,8 @@ "b" ], "dst_arrow": true, - "index": 0 + "index": 0, + "glob": false }, "references": [ { diff --git a/testdata/d2ir/TestCompile/scenarios/root.exp.json b/testdata/d2ir/TestCompile/scenarios/root.exp.json index 591518abf..0c7ae1e33 100644 --- a/testdata/d2ir/TestCompile/scenarios/root.exp.json +++ b/testdata/d2ir/TestCompile/scenarios/root.exp.json @@ -790,7 +790,8 @@ "y" ], "dst_arrow": true, - "index": 0 + "index": 0, + "glob": false }, "references": [ { @@ -1289,7 +1290,8 @@ "y" ], "dst_arrow": true, - "index": 0 + "index": 0, + "glob": false }, "references": [ { @@ -1665,7 +1667,8 @@ "y" ], "dst_arrow": true, - "index": 0 + "index": 0, + "glob": false }, "references": [ { diff --git a/testdata/d2ir/TestCompile/steps/recursive.exp.json b/testdata/d2ir/TestCompile/steps/recursive.exp.json index 3e09926d4..bcaeb4be0 100644 --- a/testdata/d2ir/TestCompile/steps/recursive.exp.json +++ b/testdata/d2ir/TestCompile/steps/recursive.exp.json @@ -790,7 +790,8 @@ "y" ], "dst_arrow": true, - "index": 0 + "index": 0, + "glob": false }, "references": [ { @@ -2259,7 +2260,8 @@ "y" ], "dst_arrow": true, - "index": 0 + "index": 0, + "glob": false }, "references": [ { @@ -2561,7 +2563,8 @@ "y" ], "dst_arrow": true, - "index": 0 + "index": 0, + "glob": false }, "references": [ { @@ -3099,7 +3102,8 @@ "y" ], "dst_arrow": true, - "index": 0 + "index": 0, + "glob": false }, "references": [ { diff --git a/testdata/d2ir/TestCompile/steps/root.exp.json b/testdata/d2ir/TestCompile/steps/root.exp.json index ec142d977..a8b486f76 100644 --- a/testdata/d2ir/TestCompile/steps/root.exp.json +++ b/testdata/d2ir/TestCompile/steps/root.exp.json @@ -790,7 +790,8 @@ "y" ], "dst_arrow": true, - "index": 0 + "index": 0, + "glob": false }, "references": [ { @@ -1599,7 +1600,8 @@ "y" ], "dst_arrow": true, - "index": 0 + "index": 0, + "glob": false }, "references": [ { @@ -1975,7 +1977,8 @@ "y" ], "dst_arrow": true, - "index": 0 + "index": 0, + "glob": false }, "references": [ {