d2ir: Fix another lazy glob bug found by Alex
This commit is contained in:
parent
a24716d1f1
commit
8455a7da8d
3 changed files with 724 additions and 7 deletions
11
d2ir/d2ir.go
11
d2ir/d2ir.go
|
|
@ -710,22 +710,25 @@ func (m *Map) EnsureField(kp *d2ast.KeyPath, refctx *RefContext, create bool, c
|
||||||
|
|
||||||
func (m *Map) ensureField(i int, kp *d2ast.KeyPath, refctx *RefContext, create bool, gctx *globContext, c *compiler, fa *[]*Field) error {
|
func (m *Map) ensureField(i int, kp *d2ast.KeyPath, refctx *RefContext, create bool, gctx *globContext, c *compiler, fa *[]*Field) error {
|
||||||
filter := func(f *Field, passthrough bool) bool {
|
filter := func(f *Field, passthrough bool) bool {
|
||||||
|
ks := d2format.Format(d2ast.MakeKeyPath(BoardIDA(f)))
|
||||||
if gctx != nil {
|
if gctx != nil {
|
||||||
// For globs with edges, we only ignore duplicate fields if the glob is not at the terminal of the keypath, the glob is on the common key or the glob is on the edge key.
|
// For globs with edges, we only ignore duplicate fields if the glob is not at the terminal of the keypath, the glob is on the common key or the glob is on the edge key.
|
||||||
if !kp.HasGlob() {
|
if !kp.HasGlob() {
|
||||||
|
if !passthrough {
|
||||||
|
gctx.appliedFields[ks] = struct{}{}
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
lastEl := kp.Path[len(kp.Path)-1]
|
lastEl := kp.Path[len(kp.Path)-1]
|
||||||
if len(refctx.Key.Edges) == 0 || lastEl.UnquotedString == nil || len(lastEl.UnquotedString.Pattern) == 0 || kp == refctx.Key.Key || kp == refctx.Key.EdgeKey {
|
if len(refctx.Key.Edges) == 0 || lastEl.UnquotedString == nil || len(lastEl.UnquotedString.Pattern) == 0 || kp == refctx.Key.Key || kp == refctx.Key.EdgeKey {
|
||||||
ks := d2format.Format(d2ast.MakeKeyPath(BoardIDA(f)))
|
|
||||||
if _, ok := gctx.appliedFields[ks]; ok {
|
if _, ok := gctx.appliedFields[ks]; ok {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if !passthrough {
|
if !passthrough {
|
||||||
gctx.appliedFields[ks] = struct{}{}
|
gctx.appliedFields[ks] = struct{}{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
faAppend := func(fa2 ...*Field) {
|
faAppend := func(fa2 ...*Field) {
|
||||||
|
|
@ -745,7 +748,7 @@ func (m *Map) ensureField(i int, kp *d2ast.KeyPath, refctx *RefContext, create b
|
||||||
} else {
|
} else {
|
||||||
for _, f := range fa2 {
|
for _, f := range fa2 {
|
||||||
if !filter(f, true) {
|
if !filter(f, true) {
|
||||||
return nil
|
continue
|
||||||
}
|
}
|
||||||
if f.Map() == nil {
|
if f.Map() == nil {
|
||||||
f.Composite = &Map{
|
f.Composite = &Map{
|
||||||
|
|
@ -766,7 +769,7 @@ func (m *Map) ensureField(i int, kp *d2ast.KeyPath, refctx *RefContext, create b
|
||||||
faAppend(f)
|
faAppend(f)
|
||||||
} else {
|
} else {
|
||||||
if !filter(f, true) {
|
if !filter(f, true) {
|
||||||
return nil
|
continue
|
||||||
}
|
}
|
||||||
if f.Map() == nil {
|
if f.Map() == nil {
|
||||||
f.Composite = &Map{
|
f.Composite = &Map{
|
||||||
|
|
|
||||||
|
|
@ -432,7 +432,6 @@ layers: {
|
||||||
}
|
}
|
||||||
`)
|
`)
|
||||||
assert.Success(t, err)
|
assert.Success(t, err)
|
||||||
t.Log(m)
|
|
||||||
assertQuery(t, m, 14, 0, nil, "")
|
assertQuery(t, m, 14, 0, nil, "")
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -469,6 +468,20 @@ layers: {
|
||||||
assertQuery(t, m, 8, 2, nil, "")
|
assertQuery(t, m, 8, 2, nil, "")
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "alixander-review/4",
|
||||||
|
run: func(t testing.TB) {
|
||||||
|
m, err := compile(t, `
|
||||||
|
**.child
|
||||||
|
|
||||||
|
a
|
||||||
|
b
|
||||||
|
c
|
||||||
|
`)
|
||||||
|
assert.Success(t, err)
|
||||||
|
assertQuery(t, m, 6, 0, nil, "")
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
runa(t, tca)
|
runa(t, tca)
|
||||||
|
|
|
||||||
701
testdata/d2ir/TestCompile/patterns/alixander-review/4.exp.json
generated
vendored
Normal file
701
testdata/d2ir/TestCompile/patterns/alixander-review/4.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,701 @@
|
||||||
|
{
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"name": "a",
|
||||||
|
"composite": {
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"name": "child",
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "child",
|
||||||
|
"raw_string": "child"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:8:9",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:2:3",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "child",
|
||||||
|
"raw_string": "child"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:8:9",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:8:9",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:2:3",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "child",
|
||||||
|
"raw_string": "child"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "child",
|
||||||
|
"raw_string": "child"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:8:9",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:2:3",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "child",
|
||||||
|
"raw_string": "child"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:8:9",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:8:9",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:2:3",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "child",
|
||||||
|
"raw_string": "child"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "child",
|
||||||
|
"raw_string": "child"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:8:9",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:2:3",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "child",
|
||||||
|
"raw_string": "child"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:8:9",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:8:9",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:2:3",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "child",
|
||||||
|
"raw_string": "child"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"edges": null
|
||||||
|
},
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,3:0:11-3:1:12",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "a",
|
||||||
|
"raw_string": "a"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,3:0:11-3:1:12",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,3:0:11-3:1:12",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "a",
|
||||||
|
"raw_string": "a"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,3:0:11-3:1:12",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,3:0:11-3:1:12",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,3:0:11-3:1:12",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "a",
|
||||||
|
"raw_string": "a"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "b",
|
||||||
|
"composite": {
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"name": "child",
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "child",
|
||||||
|
"raw_string": "child"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:8:9",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:2:3",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "child",
|
||||||
|
"raw_string": "child"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:8:9",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:8:9",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:2:3",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "child",
|
||||||
|
"raw_string": "child"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "child",
|
||||||
|
"raw_string": "child"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:8:9",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:2:3",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "child",
|
||||||
|
"raw_string": "child"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:8:9",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:8:9",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:2:3",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "child",
|
||||||
|
"raw_string": "child"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"edges": null
|
||||||
|
},
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,4:0:13-4:1:14",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "b",
|
||||||
|
"raw_string": "b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,4:0:13-4:1:14",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,4:0:13-4:1:14",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "b",
|
||||||
|
"raw_string": "b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,4:0:13-4:1:14",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,4:0:13-4:1:14",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,4:0:13-4:1:14",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "b",
|
||||||
|
"raw_string": "b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "c",
|
||||||
|
"composite": {
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"name": "child",
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "child",
|
||||||
|
"raw_string": "child"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:8:9",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:2:3",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "child",
|
||||||
|
"raw_string": "child"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:8:9",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:8:9",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:0:1-1:2:3",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "child",
|
||||||
|
"raw_string": "child"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"edges": null
|
||||||
|
},
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,5:0:15-5:1:16",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "c",
|
||||||
|
"raw_string": "c"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,5:0:15-5:1:16",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,5:0:15-5:1:16",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "c",
|
||||||
|
"raw_string": "c"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,5:0:15-5:1:16",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,5:0:15-5:1:16",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/4.d2,5:0:15-5:1:16",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "c",
|
||||||
|
"raw_string": "c"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"edges": null
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue