commit
17cb936747
50 changed files with 25094 additions and 141 deletions
|
|
@ -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 🧹
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
129
d2ir/compile.go
129
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(),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
301
d2ir/d2ir.go
301
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]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
59
d2ir/pattern.go
Normal file
59
d2ir/pattern.go
Normal file
|
|
@ -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
|
||||
}
|
||||
335
d2ir/pattern_test.go
Normal file
335
d2ir/pattern_test.go
Normal file
|
|
@ -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)
|
||||
})
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
42
testdata/d2compiler/TestCompile2/nulls/basic/attribute.exp.json
generated
vendored
42
testdata/d2compiler/TestCompile2/nulls/basic/attribute.exp.json
generated
vendored
|
|
@ -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": {
|
||||
|
|
|
|||
31
testdata/d2compiler/TestCompile2/nulls/implicit/delete-children.exp.json
generated
vendored
31
testdata/d2compiler/TestCompile2/nulls/implicit/delete-children.exp.json
generated
vendored
|
|
@ -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": {
|
||||
|
|
|
|||
31
testdata/d2compiler/TestCompile2/nulls/reappear/children-reset.exp.json
generated
vendored
31
testdata/d2compiler/TestCompile2/nulls/reappear/children-reset.exp.json
generated
vendored
|
|
@ -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",
|
||||
|
|
|
|||
9
testdata/d2ir/TestCompile/edges/chain.exp.json
generated
vendored
9
testdata/d2ir/TestCompile/edges/chain.exp.json
generated
vendored
|
|
@ -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": [
|
||||
{
|
||||
|
|
|
|||
3
testdata/d2ir/TestCompile/edges/nested.exp.json
generated
vendored
3
testdata/d2ir/TestCompile/edges/nested.exp.json
generated
vendored
|
|
@ -704,7 +704,8 @@
|
|||
"p"
|
||||
],
|
||||
"dst_arrow": true,
|
||||
"index": 0
|
||||
"index": 0,
|
||||
"glob": false
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
|
|
|
|||
3
testdata/d2ir/TestCompile/edges/root.exp.json
generated
vendored
3
testdata/d2ir/TestCompile/edges/root.exp.json
generated
vendored
|
|
@ -242,7 +242,8 @@
|
|||
"y"
|
||||
],
|
||||
"dst_arrow": true,
|
||||
"index": 0
|
||||
"index": 0,
|
||||
"glob": false
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
|
|
|
|||
3
testdata/d2ir/TestCompile/edges/underscore.exp.json
generated
vendored
3
testdata/d2ir/TestCompile/edges/underscore.exp.json
generated
vendored
|
|
@ -422,7 +422,8 @@
|
|||
"z"
|
||||
],
|
||||
"dst_arrow": true,
|
||||
"index": 0
|
||||
"index": 0,
|
||||
"glob": false
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
|
|
|
|||
159
testdata/d2ir/TestCompile/globs/escaped.exp.json
generated
vendored
Normal file
159
testdata/d2ir/TestCompile/globs/escaped.exp.json
generated
vendored
Normal file
|
|
@ -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
|
||||
}
|
||||
159
testdata/d2ir/TestCompile/globs/prefix.exp.json
generated
vendored
Normal file
159
testdata/d2ir/TestCompile/globs/prefix.exp.json
generated
vendored
Normal file
|
|
@ -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
|
||||
}
|
||||
1375
testdata/d2ir/TestCompile/layers/errs/3/bad_edge.exp.json
generated
vendored
Normal file
1375
testdata/d2ir/TestCompile/layers/errs/3/bad_edge.exp.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
3
testdata/d2ir/TestCompile/layers/errs/4/good_edge.exp.json
generated
vendored
3
testdata/d2ir/TestCompile/layers/errs/4/good_edge.exp.json
generated
vendored
|
|
@ -465,7 +465,8 @@
|
|||
"y"
|
||||
],
|
||||
"dst_arrow": true,
|
||||
"index": 0
|
||||
"index": 0,
|
||||
"glob": false
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
|
|
|
|||
3
testdata/d2ir/TestCompile/layers/root.exp.json
generated
vendored
3
testdata/d2ir/TestCompile/layers/root.exp.json
generated
vendored
|
|
@ -805,7 +805,8 @@
|
|||
"y"
|
||||
],
|
||||
"dst_arrow": true,
|
||||
"index": 0
|
||||
"index": 0,
|
||||
"glob": false
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
|
|
|
|||
159
testdata/d2ir/TestCompile/patterns/case.exp.json
generated
vendored
Normal file
159
testdata/d2ir/TestCompile/patterns/case.exp.json
generated
vendored
Normal file
|
|
@ -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
|
||||
}
|
||||
159
testdata/d2ir/TestCompile/patterns/case/1.exp.json
generated
vendored
Normal file
159
testdata/d2ir/TestCompile/patterns/case/1.exp.json
generated
vendored
Normal file
|
|
@ -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
|
||||
}
|
||||
139
testdata/d2ir/TestCompile/patterns/case/2.exp.json
generated
vendored
Normal file
139
testdata/d2ir/TestCompile/patterns/case/2.exp.json
generated
vendored
Normal file
|
|
@ -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
|
||||
}
|
||||
903
testdata/d2ir/TestCompile/patterns/double-glob.exp.json
generated
vendored
Normal file
903
testdata/d2ir/TestCompile/patterns/double-glob.exp.json
generated
vendored
Normal file
|
|
@ -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
|
||||
}
|
||||
1095
testdata/d2ir/TestCompile/patterns/double-glob/1.exp.json
generated
vendored
Normal file
1095
testdata/d2ir/TestCompile/patterns/double-glob/1.exp.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
1161
testdata/d2ir/TestCompile/patterns/double-glob/edge-no-container.exp.json
generated
vendored
Normal file
1161
testdata/d2ir/TestCompile/patterns/double-glob/edge-no-container.exp.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
811
testdata/d2ir/TestCompile/patterns/double-glob/edge/1.exp.json
generated
vendored
Normal file
811
testdata/d2ir/TestCompile/patterns/double-glob/edge/1.exp.json
generated
vendored
Normal file
|
|
@ -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": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
511
testdata/d2ir/TestCompile/patterns/double-glob/edge/2.exp.json
generated
vendored
Normal file
511
testdata/d2ir/TestCompile/patterns/double-glob/edge/2.exp.json
generated
vendored
Normal file
|
|
@ -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": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
3343
testdata/d2ir/TestCompile/patterns/edge-glob-index.exp.json
generated
vendored
Normal file
3343
testdata/d2ir/TestCompile/patterns/edge-glob-index.exp.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
779
testdata/d2ir/TestCompile/patterns/edge-nexus.exp.json
generated
vendored
Normal file
779
testdata/d2ir/TestCompile/patterns/edge-nexus.exp.json
generated
vendored
Normal file
|
|
@ -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": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
352
testdata/d2ir/TestCompile/patterns/edge/1.exp.json
generated
vendored
Normal file
352
testdata/d2ir/TestCompile/patterns/edge/1.exp.json
generated
vendored
Normal file
|
|
@ -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": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
592
testdata/d2ir/TestCompile/patterns/edge/2.exp.json
generated
vendored
Normal file
592
testdata/d2ir/TestCompile/patterns/edge/2.exp.json
generated
vendored
Normal file
|
|
@ -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
|
||||
}
|
||||
672
testdata/d2ir/TestCompile/patterns/edge/3.exp.json
generated
vendored
Normal file
672
testdata/d2ir/TestCompile/patterns/edge/3.exp.json
generated
vendored
Normal file
|
|
@ -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
|
||||
}
|
||||
667
testdata/d2ir/TestCompile/patterns/errors/glob-edge-glob-index.exp.json
generated
vendored
Normal file
667
testdata/d2ir/TestCompile/patterns/errors/glob-edge-glob-index.exp.json
generated
vendored
Normal file
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
236
testdata/d2ir/TestCompile/patterns/escaped.exp.json
generated
vendored
Normal file
236
testdata/d2ir/TestCompile/patterns/escaped.exp.json
generated
vendored
Normal file
|
|
@ -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
|
||||
}
|
||||
3945
testdata/d2ir/TestCompile/patterns/glob-edge-glob-index.exp.json
generated
vendored
Normal file
3945
testdata/d2ir/TestCompile/patterns/glob-edge-glob-index.exp.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
997
testdata/d2ir/TestCompile/patterns/nested/prefix-suffix/3.exp.json
generated
vendored
Normal file
997
testdata/d2ir/TestCompile/patterns/nested/prefix-suffix/3.exp.json
generated
vendored
Normal file
|
|
@ -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
|
||||
}
|
||||
159
testdata/d2ir/TestCompile/patterns/prefix-suffix.exp.json
generated
vendored
Normal file
159
testdata/d2ir/TestCompile/patterns/prefix-suffix.exp.json
generated
vendored
Normal file
|
|
@ -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
|
||||
}
|
||||
159
testdata/d2ir/TestCompile/patterns/prefix-suffix/2.exp.json
generated
vendored
Normal file
159
testdata/d2ir/TestCompile/patterns/prefix-suffix/2.exp.json
generated
vendored
Normal file
|
|
@ -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
|
||||
}
|
||||
159
testdata/d2ir/TestCompile/patterns/prefix-suffix/3.exp.json
generated
vendored
Normal file
159
testdata/d2ir/TestCompile/patterns/prefix-suffix/3.exp.json
generated
vendored
Normal file
|
|
@ -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
|
||||
}
|
||||
159
testdata/d2ir/TestCompile/patterns/prefix.exp.json
generated
vendored
Normal file
159
testdata/d2ir/TestCompile/patterns/prefix.exp.json
generated
vendored
Normal file
|
|
@ -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
|
||||
}
|
||||
1284
testdata/d2ir/TestCompile/patterns/reserved.exp.json
generated
vendored
Normal file
1284
testdata/d2ir/TestCompile/patterns/reserved.exp.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
3863
testdata/d2ir/TestCompile/patterns/scenarios.exp.json
generated
vendored
Normal file
3863
testdata/d2ir/TestCompile/patterns/scenarios.exp.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
159
testdata/d2ir/TestCompile/patterns/suffix.exp.json
generated
vendored
Normal file
159
testdata/d2ir/TestCompile/patterns/suffix.exp.json
generated
vendored
Normal file
|
|
@ -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
|
||||
}
|
||||
6
testdata/d2ir/TestCompile/scenarios/edge.exp.json
generated
vendored
6
testdata/d2ir/TestCompile/scenarios/edge.exp.json
generated
vendored
|
|
@ -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": [
|
||||
{
|
||||
|
|
|
|||
9
testdata/d2ir/TestCompile/scenarios/root.exp.json
generated
vendored
9
testdata/d2ir/TestCompile/scenarios/root.exp.json
generated
vendored
|
|
@ -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": [
|
||||
{
|
||||
|
|
|
|||
12
testdata/d2ir/TestCompile/steps/recursive.exp.json
generated
vendored
12
testdata/d2ir/TestCompile/steps/recursive.exp.json
generated
vendored
|
|
@ -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": [
|
||||
{
|
||||
|
|
|
|||
9
testdata/d2ir/TestCompile/steps/root.exp.json
generated
vendored
9
testdata/d2ir/TestCompile/steps/root.exp.json
generated
vendored
|
|
@ -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": [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue