d2ir: Fix lazy globs being applied in reverse
This commit is contained in:
parent
8455a7da8d
commit
d90f8253df
12 changed files with 6645 additions and 5462 deletions
|
|
@ -359,6 +359,20 @@ func (c *compiler) overlay(base *Map, f *Field) {
|
||||||
f.Composite = base
|
f.Composite = base
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (g *globContext) prefixed(dst *Map) *globContext {
|
||||||
|
g2 := *g
|
||||||
|
g2.refctx = g.refctx.Copy()
|
||||||
|
prefix := d2ast.MakeKeyPath(RelIDA(g2.refctx.ScopeMap, dst))
|
||||||
|
g2.refctx.Key = g2.refctx.Key.Copy()
|
||||||
|
if g2.refctx.Key.Key != nil {
|
||||||
|
prefix.Path = append(prefix.Path, g2.refctx.Key.Key.Path...)
|
||||||
|
}
|
||||||
|
if len(prefix.Path) > 0 {
|
||||||
|
g2.refctx.Key.Key = prefix
|
||||||
|
}
|
||||||
|
return &g2
|
||||||
|
}
|
||||||
|
|
||||||
func (c *compiler) compileMap(dst *Map, ast, scopeAST *d2ast.Map) {
|
func (c *compiler) compileMap(dst *Map, ast, scopeAST *d2ast.Map) {
|
||||||
var globs []*globContext
|
var globs []*globContext
|
||||||
if len(c.globContextStack) > 0 {
|
if len(c.globContextStack) > 0 {
|
||||||
|
|
@ -366,36 +380,13 @@ func (c *compiler) compileMap(dst *Map, ast, scopeAST *d2ast.Map) {
|
||||||
if NodeBoardKind(dst) == BoardLayer {
|
if NodeBoardKind(dst) == BoardLayer {
|
||||||
for _, g := range previousGlobs {
|
for _, g := range previousGlobs {
|
||||||
if g.refctx.Key.HasTripleGlob() {
|
if g.refctx.Key.HasTripleGlob() {
|
||||||
// Same as below but reset applied too.
|
globs = append(globs, g.prefixed(dst))
|
||||||
g2 := *g
|
|
||||||
g2.refctx = g.refctx.Copy()
|
|
||||||
g2.appliedFields = make(map[string]struct{})
|
|
||||||
g2.appliedEdges = make(map[string]struct{})
|
|
||||||
prefix := d2ast.MakeKeyPath(RelIDA(g2.refctx.ScopeMap, dst))
|
|
||||||
g2.refctx.Key = g2.refctx.Key.Copy()
|
|
||||||
if g2.refctx.Key.Key != nil {
|
|
||||||
prefix.Path = append(prefix.Path, g2.refctx.Key.Key.Path...)
|
|
||||||
}
|
|
||||||
if len(prefix.Path) > 0 {
|
|
||||||
g2.refctx.Key.Key = prefix
|
|
||||||
}
|
|
||||||
globs = append(globs, &g2)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if NodeBoardKind(dst) != "" {
|
} else if NodeBoardKind(dst) != "" {
|
||||||
// Make all globs relative to the scenario or step.
|
// Make all globs relative to the scenario or step.
|
||||||
for _, g := range previousGlobs {
|
for _, g := range previousGlobs {
|
||||||
g2 := *g
|
globs = append(globs, g.prefixed(dst))
|
||||||
g2.refctx = g.refctx.Copy()
|
|
||||||
prefix := d2ast.MakeKeyPath(RelIDA(g2.refctx.ScopeMap, dst))
|
|
||||||
g2.refctx.Key = g2.refctx.Key.Copy()
|
|
||||||
if g2.refctx.Key.Key != nil {
|
|
||||||
prefix.Path = append(prefix.Path, g2.refctx.Key.Key.Path...)
|
|
||||||
}
|
|
||||||
if len(prefix.Path) > 0 {
|
|
||||||
g2.refctx.Key.Key = prefix
|
|
||||||
}
|
|
||||||
globs = append(globs, &g2)
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
globs = append(globs, previousGlobs...)
|
globs = append(globs, previousGlobs...)
|
||||||
|
|
@ -492,7 +483,7 @@ func (c *compiler) ensureGlobContext(refctx *RefContext) *globContext {
|
||||||
|
|
||||||
func (c *compiler) compileKey(refctx *RefContext) {
|
func (c *compiler) compileKey(refctx *RefContext) {
|
||||||
if refctx.Key.HasGlob() {
|
if refctx.Key.HasGlob() {
|
||||||
// These three printlns are for debugging infinite loops.
|
// These printlns are for debugging infinite loops.
|
||||||
// println("og", refctx.Edge, refctx.Key, refctx.Scope, refctx.ScopeMap, refctx.ScopeAST)
|
// println("og", refctx.Edge, refctx.Key, refctx.Scope, refctx.ScopeMap, refctx.ScopeAST)
|
||||||
for _, refctx2 := range c.globRefContextStack {
|
for _, refctx2 := range c.globRefContextStack {
|
||||||
// println("st", refctx2.Edge, refctx2.Key, refctx2.Scope, refctx2.ScopeMap, refctx2.ScopeAST)
|
// println("st", refctx2.Edge, refctx2.Key, refctx2.Scope, refctx2.ScopeMap, refctx2.ScopeAST)
|
||||||
|
|
@ -508,11 +499,19 @@ func (c *compiler) compileKey(refctx *RefContext) {
|
||||||
}()
|
}()
|
||||||
c.ensureGlobContext(refctx)
|
c.ensureGlobContext(refctx)
|
||||||
}
|
}
|
||||||
|
oldFields := refctx.ScopeMap.FieldCountRecursive()
|
||||||
|
oldEdges := refctx.ScopeMap.EdgeCountRecursive()
|
||||||
if len(refctx.Key.Edges) == 0 {
|
if len(refctx.Key.Edges) == 0 {
|
||||||
c.compileField(refctx.ScopeMap, refctx.Key.Key, refctx)
|
c.compileField(refctx.ScopeMap, refctx.Key.Key, refctx)
|
||||||
} else {
|
} else {
|
||||||
c.compileEdges(refctx)
|
c.compileEdges(refctx)
|
||||||
}
|
}
|
||||||
|
if oldFields != refctx.ScopeMap.FieldCountRecursive() || oldEdges != refctx.ScopeMap.EdgeCountRecursive() {
|
||||||
|
for _, gctx2 := range c.globContexts() {
|
||||||
|
// println(d2format.Format(gctx2.refctx.Key), d2format.Format(refctx.Key))
|
||||||
|
c.compileKey(gctx2.refctx)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *compiler) compileField(dst *Map, kp *d2ast.KeyPath, refctx *RefContext) {
|
func (c *compiler) compileField(dst *Map, kp *d2ast.KeyPath, refctx *RefContext) {
|
||||||
|
|
|
||||||
30
d2ir/d2ir.go
30
d2ir/d2ir.go
|
|
@ -697,21 +697,18 @@ func (m *Map) EnsureField(kp *d2ast.KeyPath, refctx *RefContext, create bool, c
|
||||||
|
|
||||||
var fa []*Field
|
var fa []*Field
|
||||||
err := m.ensureField(i, kp, refctx, create, gctx, c, &fa)
|
err := m.ensureField(i, kp, refctx, create, gctx, c, &fa)
|
||||||
if err != nil {
|
|
||||||
return fa, err
|
return fa, err
|
||||||
}
|
|
||||||
if len(fa) > 0 && create && c != nil {
|
|
||||||
for _, gctx2 := range c.globContexts() {
|
|
||||||
c.compileKey(gctx2.refctx)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return fa, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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 {
|
||||||
|
var ks string
|
||||||
|
if refctx.Key.HasTripleGlob() {
|
||||||
|
ks = d2format.Format(d2ast.MakeKeyPath(IDA(f)))
|
||||||
|
} else {
|
||||||
|
ks = d2format.Format(d2ast.MakeKeyPath(BoardIDA(f)))
|
||||||
|
}
|
||||||
// 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 {
|
if !passthrough {
|
||||||
|
|
@ -1031,15 +1028,7 @@ func (m *Map) CreateEdge(eid *EdgeID, refctx *RefContext, c *compiler) ([]*Edge,
|
||||||
gctx = c.ensureGlobContext(refctx)
|
gctx = c.ensureGlobContext(refctx)
|
||||||
}
|
}
|
||||||
err := m.createEdge(eid, refctx, gctx, c, &ea)
|
err := m.createEdge(eid, refctx, gctx, c, &ea)
|
||||||
if err != nil {
|
|
||||||
return ea, err
|
return ea, err
|
||||||
}
|
|
||||||
if len(ea) > 0 && c != nil {
|
|
||||||
for _, gctx2 := range c.globContexts() {
|
|
||||||
c.compileKey(gctx2.refctx)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ea, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Map) createEdge(eid *EdgeID, refctx *RefContext, gctx *globContext, c *compiler, ea *[]*Edge) error {
|
func (m *Map) createEdge(eid *EdgeID, refctx *RefContext, gctx *globContext, c *compiler, ea *[]*Edge) error {
|
||||||
|
|
@ -1179,7 +1168,12 @@ func (m *Map) createEdge2(eid *EdgeID, refctx *RefContext, gctx *globContext, sr
|
||||||
}
|
}
|
||||||
|
|
||||||
if gctx != nil {
|
if gctx != nil {
|
||||||
ks := d2format.Format(d2ast.MakeKeyPath(BoardIDA(e)))
|
var ks string
|
||||||
|
if refctx.Key.HasTripleGlob() {
|
||||||
|
ks = d2format.Format(d2ast.MakeKeyPath(IDA(e)))
|
||||||
|
} else {
|
||||||
|
ks = d2format.Format(d2ast.MakeKeyPath(BoardIDA(e)))
|
||||||
|
}
|
||||||
if _, ok := gctx.appliedEdges[ks]; ok {
|
if _, ok := gctx.appliedEdges[ks]; ok {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,10 +49,9 @@ func (m *Map) _tripleGlob(fa *[]*Field) {
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if NodeBoardKind(f) != "" {
|
if NodeBoardKind(f) == "" {
|
||||||
continue
|
|
||||||
}
|
|
||||||
*fa = append(*fa, f)
|
*fa = append(*fa, f)
|
||||||
|
}
|
||||||
if f.Map() != nil {
|
if f.Map() != nil {
|
||||||
f.Map()._tripleGlob(fa)
|
f.Map()._tripleGlob(fa)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -482,6 +482,39 @@ c
|
||||||
assertQuery(t, m, 6, 0, nil, "")
|
assertQuery(t, m, 6, 0, nil, "")
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "override/1",
|
||||||
|
run: func(t testing.TB) {
|
||||||
|
m, err := compile(t, `
|
||||||
|
**.style.fill: yellow
|
||||||
|
**.style.fill: red
|
||||||
|
|
||||||
|
a
|
||||||
|
`)
|
||||||
|
assert.Success(t, err)
|
||||||
|
assertQuery(t, m, 3, 0, nil, "")
|
||||||
|
assertQuery(t, m, 0, 0, "red", "a.style.fill")
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "override/2",
|
||||||
|
run: func(t testing.TB) {
|
||||||
|
m, err := compile(t, `
|
||||||
|
***.style.fill: yellow
|
||||||
|
|
||||||
|
layers: {
|
||||||
|
hi: {
|
||||||
|
**.style.fill: red
|
||||||
|
# should be red, but it's yellow right now
|
||||||
|
a
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`)
|
||||||
|
assert.Success(t, err)
|
||||||
|
assertQuery(t, m, 5, 0, nil, "")
|
||||||
|
assertQuery(t, m, 0, 0, "red", "layers.hi.a.style.fill")
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
runa(t, tca)
|
runa(t, tca)
|
||||||
|
|
|
||||||
3702
testdata/d2ir/TestCompile/patterns/alixander-review/1.exp.json
generated
vendored
3702
testdata/d2ir/TestCompile/patterns/alixander-review/1.exp.json
generated
vendored
File diff suppressed because it is too large
Load diff
328
testdata/d2ir/TestCompile/patterns/alixander-review/3.exp.json
generated
vendored
328
testdata/d2ir/TestCompile/patterns/alixander-review/3.exp.json
generated
vendored
|
|
@ -1204,6 +1204,334 @@
|
||||||
"value": {}
|
"value": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:4:8-3:5:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "b",
|
||||||
|
"raw_string": "b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:0:4-3:5:9",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:0:4-3:3:7",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "***",
|
||||||
|
"raw_string": "***"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:4:8-3:5:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "b",
|
||||||
|
"raw_string": "b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:0:4-3:10:14",
|
||||||
|
"src": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:0:4-3:5:9",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:0:4-3:3:7",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "***",
|
||||||
|
"raw_string": "***"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:4:8-3:5:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "b",
|
||||||
|
"raw_string": "b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"src_arrow": "",
|
||||||
|
"dst": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:9:13-3:10:14",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:9:13-3:10:14",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "c",
|
||||||
|
"raw_string": "c"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dst_arrow": ">"
|
||||||
|
},
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:0:4-3:10:14",
|
||||||
|
"edges": [
|
||||||
|
{
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:0:4-3:10:14",
|
||||||
|
"src": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:0:4-3:5:9",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:0:4-3:3:7",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "***",
|
||||||
|
"raw_string": "***"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:4:8-3:5:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "b",
|
||||||
|
"raw_string": "b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"src_arrow": "",
|
||||||
|
"dst": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:9:13-3:10:14",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:9:13-3:10:14",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "c",
|
||||||
|
"raw_string": "c"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dst_arrow": ">"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"primary": {},
|
||||||
|
"value": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:4:8-3:5:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "b",
|
||||||
|
"raw_string": "b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:0:4-3:5:9",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:0:4-3:3:7",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "***",
|
||||||
|
"raw_string": "***"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:4:8-3:5:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "b",
|
||||||
|
"raw_string": "b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:0:4-3:10:14",
|
||||||
|
"src": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:0:4-3:5:9",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:0:4-3:3:7",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "***",
|
||||||
|
"raw_string": "***"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:4:8-3:5:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "b",
|
||||||
|
"raw_string": "b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"src_arrow": "",
|
||||||
|
"dst": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:9:13-3:10:14",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:9:13-3:10:14",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "c",
|
||||||
|
"raw_string": "c"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dst_arrow": ">"
|
||||||
|
},
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:0:4-3:10:14",
|
||||||
|
"edges": [
|
||||||
|
{
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:0:4-3:10:14",
|
||||||
|
"src": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:0:4-3:5:9",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:0:4-3:3:7",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "***",
|
||||||
|
"raw_string": "***"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:4:8-3:5:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "b",
|
||||||
|
"raw_string": "b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"src_arrow": "",
|
||||||
|
"dst": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:9:13-3:10:14",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/alixander-review/3.d2,3:9:13-3:10:14",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "c",
|
||||||
|
"raw_string": "c"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dst_arrow": ">"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"primary": {},
|
||||||
|
"value": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
293
testdata/d2ir/TestCompile/patterns/double-glob/defaults.exp.json
generated
vendored
293
testdata/d2ir/TestCompile/patterns/double-glob/defaults.exp.json
generated
vendored
|
|
@ -1560,83 +1560,6 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "shape",
|
|
||||||
"primary": {
|
|
||||||
"value": {
|
|
||||||
"range": "TestCompile/patterns/double-glob/defaults.d2,1:8:14-1:12:18",
|
|
||||||
"value": [
|
|
||||||
{
|
|
||||||
"string": "page",
|
|
||||||
"raw_string": "page"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"references": [
|
|
||||||
{
|
|
||||||
"string": {
|
|
||||||
"range": "TestCompile/patterns/double-glob/defaults.d2,1:1:7-1:6:12",
|
|
||||||
"value": [
|
|
||||||
{
|
|
||||||
"string": "shape",
|
|
||||||
"raw_string": "shape"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"key_path": {
|
|
||||||
"range": "TestCompile/patterns/double-glob/defaults.d2,1:1:7-1:6:12",
|
|
||||||
"path": [
|
|
||||||
{
|
|
||||||
"unquoted_string": {
|
|
||||||
"range": "TestCompile/patterns/double-glob/defaults.d2,1:1:7-1:6:12",
|
|
||||||
"value": [
|
|
||||||
{
|
|
||||||
"string": "shape",
|
|
||||||
"raw_string": "shape"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"context": {
|
|
||||||
"edge": null,
|
|
||||||
"key": {
|
|
||||||
"range": "TestCompile/patterns/double-glob/defaults.d2,1:1:7-1:12:18",
|
|
||||||
"key": {
|
|
||||||
"range": "TestCompile/patterns/double-glob/defaults.d2,1:1:7-1:6:12",
|
|
||||||
"path": [
|
|
||||||
{
|
|
||||||
"unquoted_string": {
|
|
||||||
"range": "TestCompile/patterns/double-glob/defaults.d2,1:1:7-1:6:12",
|
|
||||||
"value": [
|
|
||||||
{
|
|
||||||
"string": "shape",
|
|
||||||
"raw_string": "shape"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"primary": {},
|
|
||||||
"value": {
|
|
||||||
"unquoted_string": {
|
|
||||||
"range": "TestCompile/patterns/double-glob/defaults.d2,1:8:14-1:12:18",
|
|
||||||
"value": [
|
|
||||||
{
|
|
||||||
"string": "page",
|
|
||||||
"raw_string": "page"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "p",
|
"name": "p",
|
||||||
"composite": {
|
"composite": {
|
||||||
|
|
@ -1774,6 +1697,83 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "shape",
|
||||||
|
"primary": {
|
||||||
|
"value": {
|
||||||
|
"range": "TestCompile/patterns/double-glob/defaults.d2,1:8:14-1:12:18",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "page",
|
||||||
|
"raw_string": "page"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/double-glob/defaults.d2,1:1:7-1:6:12",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "shape",
|
||||||
|
"raw_string": "shape"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/double-glob/defaults.d2,1:1:7-1:6:12",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/double-glob/defaults.d2,1:1:7-1:6:12",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "shape",
|
||||||
|
"raw_string": "shape"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/double-glob/defaults.d2,1:1:7-1:12:18",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/double-glob/defaults.d2,1:1:7-1:6:12",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/double-glob/defaults.d2,1:1:7-1:6:12",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "shape",
|
||||||
|
"raw_string": "shape"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/double-glob/defaults.d2,1:8:14-1:12:18",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "page",
|
||||||
|
"raw_string": "page"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"edges": null
|
"edges": null
|
||||||
|
|
@ -1880,6 +1880,145 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": ",0:0:0-0:0:0",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "x"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": ",0:0:0-0:0:0",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": ",0:0:0-0:0:0",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "scenarios"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": ",0:0:0-0:0:0",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "x"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/double-glob/defaults.d2,0:0:0-0:2:2",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/double-glob/defaults.d2,0:0:0-2:1:20",
|
||||||
|
"key": {
|
||||||
|
"range": ",0:0:0-0:0:0",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": ",0:0:0-0:0:0",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "scenarios"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": ",0:0:0-0:0:0",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "x"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/double-glob/defaults.d2,0:0:0-0:2:2",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"map": {
|
||||||
|
"range": "TestCompile/patterns/double-glob/defaults.d2,0:4:4-2:1:20",
|
||||||
|
"nodes": [
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "TestCompile/patterns/double-glob/defaults.d2,1:1:7-1:12:18",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/double-glob/defaults.d2,1:1:7-1:6:12",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/double-glob/defaults.d2,1:1:7-1:6:12",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "shape",
|
||||||
|
"raw_string": "shape"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/double-glob/defaults.d2,1:8:14-1:12:18",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "page",
|
||||||
|
"raw_string": "page"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
782
testdata/d2ir/TestCompile/patterns/override/1.exp.json
generated
vendored
Normal file
782
testdata/d2ir/TestCompile/patterns/override/1.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,782 @@
|
||||||
|
{
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"name": "a",
|
||||||
|
"composite": {
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"name": "style",
|
||||||
|
"composite": {
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"name": "fill",
|
||||||
|
"primary": {
|
||||||
|
"value": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:15:38-2:18:41",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "red",
|
||||||
|
"raw_string": "red"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:9:10-1:13:14",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "fill",
|
||||||
|
"raw_string": "fill"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:0:1-1:13:14",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:0:1-1:2:3",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "style",
|
||||||
|
"raw_string": "style"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:9:10-1:13:14",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "fill",
|
||||||
|
"raw_string": "fill"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:0:1-1:21:22",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:0:1-1:13:14",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:0:1-1:2:3",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "style",
|
||||||
|
"raw_string": "style"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:9:10-1:13:14",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "fill",
|
||||||
|
"raw_string": "fill"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:15:16-1:21:22",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "yellow",
|
||||||
|
"raw_string": "yellow"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:9:32-2:13:36",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "fill",
|
||||||
|
"raw_string": "fill"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:0:23-2:13:36",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:0:23-2:2:25",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:3:26-2:8:31",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "style",
|
||||||
|
"raw_string": "style"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:9:32-2:13:36",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "fill",
|
||||||
|
"raw_string": "fill"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:0:23-2:18:41",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:0:23-2:13:36",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:0:23-2:2:25",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:3:26-2:8:31",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "style",
|
||||||
|
"raw_string": "style"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:9:32-2:13:36",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "fill",
|
||||||
|
"raw_string": "fill"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:15:38-2:18:41",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "red",
|
||||||
|
"raw_string": "red"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:9:32-2:13:36",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "fill",
|
||||||
|
"raw_string": "fill"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:0:23-2:13:36",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:0:23-2:2:25",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:3:26-2:8:31",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "style",
|
||||||
|
"raw_string": "style"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:9:32-2:13:36",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "fill",
|
||||||
|
"raw_string": "fill"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:0:23-2:18:41",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:0:23-2:13:36",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:0:23-2:2:25",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:3:26-2:8:31",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "style",
|
||||||
|
"raw_string": "style"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:9:32-2:13:36",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "fill",
|
||||||
|
"raw_string": "fill"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:15:38-2:18:41",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "red",
|
||||||
|
"raw_string": "red"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"edges": null
|
||||||
|
},
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "style",
|
||||||
|
"raw_string": "style"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:0:1-1:13:14",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:0:1-1:2:3",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "style",
|
||||||
|
"raw_string": "style"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:9:10-1:13:14",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "fill",
|
||||||
|
"raw_string": "fill"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:0:1-1:21:22",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:0:1-1:13:14",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:0:1-1:2:3",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:3:4-1:8:9",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "style",
|
||||||
|
"raw_string": "style"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:9:10-1:13:14",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "fill",
|
||||||
|
"raw_string": "fill"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,1:15:16-1:21:22",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "yellow",
|
||||||
|
"raw_string": "yellow"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:3:26-2:8:31",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "style",
|
||||||
|
"raw_string": "style"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:0:23-2:13:36",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:0:23-2:2:25",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:3:26-2:8:31",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "style",
|
||||||
|
"raw_string": "style"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:9:32-2:13:36",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "fill",
|
||||||
|
"raw_string": "fill"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:0:23-2:18:41",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:0:23-2:13:36",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:0:23-2:2:25",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:3:26-2:8:31",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "style",
|
||||||
|
"raw_string": "style"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:9:32-2:13:36",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "fill",
|
||||||
|
"raw_string": "fill"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:15:38-2:18:41",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "red",
|
||||||
|
"raw_string": "red"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:3:26-2:8:31",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "style",
|
||||||
|
"raw_string": "style"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:0:23-2:13:36",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:0:23-2:2:25",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:3:26-2:8:31",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "style",
|
||||||
|
"raw_string": "style"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:9:32-2:13:36",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "fill",
|
||||||
|
"raw_string": "fill"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:0:23-2:18:41",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:0:23-2:13:36",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:0:23-2:2:25",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "**",
|
||||||
|
"raw_string": "**"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
"*",
|
||||||
|
"",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:3:26-2:8:31",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "style",
|
||||||
|
"raw_string": "style"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:9:32-2:13:36",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "fill",
|
||||||
|
"raw_string": "fill"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,2:15:38-2:18:41",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "red",
|
||||||
|
"raw_string": "red"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"edges": null
|
||||||
|
},
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,4:0:43-4:1:44",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "a",
|
||||||
|
"raw_string": "a"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,4:0:43-4:1:44",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,4:0:43-4:1:44",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "a",
|
||||||
|
"raw_string": "a"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,4:0:43-4:1:44",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,4:0:43-4:1:44",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/override/1.d2,4:0:43-4:1:44",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "a",
|
||||||
|
"raw_string": "a"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"edges": null
|
||||||
|
}
|
||||||
2003
testdata/d2ir/TestCompile/patterns/override/2.exp.json
generated
vendored
Normal file
2003
testdata/d2ir/TestCompile/patterns/override/2.exp.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
118
testdata/d2ir/TestCompile/patterns/single-glob/defaults.exp.json
generated
vendored
118
testdata/d2ir/TestCompile/patterns/single-glob/defaults.exp.json
generated
vendored
|
|
@ -3466,124 +3466,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"string": {
|
|
||||||
"range": "TestCompile/patterns/single-glob/defaults.d2,0:0:0-0:7:7",
|
|
||||||
"value": [
|
|
||||||
{
|
|
||||||
"string": "wrapper",
|
|
||||||
"raw_string": "wrapper"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"key_path": {
|
|
||||||
"range": "TestCompile/patterns/single-glob/defaults.d2,0:0:0-0:9:9",
|
|
||||||
"path": [
|
|
||||||
{
|
|
||||||
"unquoted_string": {
|
|
||||||
"range": "TestCompile/patterns/single-glob/defaults.d2,0:0:0-0:7:7",
|
|
||||||
"value": [
|
|
||||||
{
|
|
||||||
"string": "wrapper",
|
|
||||||
"raw_string": "wrapper"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"unquoted_string": {
|
|
||||||
"range": "TestCompile/patterns/single-glob/defaults.d2,0:8:8-0:9:9",
|
|
||||||
"value": [
|
|
||||||
{
|
|
||||||
"string": "*",
|
|
||||||
"raw_string": "*"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"pattern": [
|
|
||||||
"*"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"context": {
|
|
||||||
"edge": null,
|
|
||||||
"key": {
|
|
||||||
"range": "TestCompile/patterns/single-glob/defaults.d2,0:0:0-2:1:27",
|
|
||||||
"key": {
|
|
||||||
"range": "TestCompile/patterns/single-glob/defaults.d2,0:0:0-0:9:9",
|
|
||||||
"path": [
|
|
||||||
{
|
|
||||||
"unquoted_string": {
|
|
||||||
"range": "TestCompile/patterns/single-glob/defaults.d2,0:0:0-0:7:7",
|
|
||||||
"value": [
|
|
||||||
{
|
|
||||||
"string": "wrapper",
|
|
||||||
"raw_string": "wrapper"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"unquoted_string": {
|
|
||||||
"range": "TestCompile/patterns/single-glob/defaults.d2,0:8:8-0:9:9",
|
|
||||||
"value": [
|
|
||||||
{
|
|
||||||
"string": "*",
|
|
||||||
"raw_string": "*"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"pattern": [
|
|
||||||
"*"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"primary": {},
|
|
||||||
"value": {
|
|
||||||
"map": {
|
|
||||||
"range": "TestCompile/patterns/single-glob/defaults.d2,0:11:11-2:1:27",
|
|
||||||
"nodes": [
|
|
||||||
{
|
|
||||||
"map_key": {
|
|
||||||
"range": "TestCompile/patterns/single-glob/defaults.d2,1:1:14-1:12:25",
|
|
||||||
"key": {
|
|
||||||
"range": "TestCompile/patterns/single-glob/defaults.d2,1:1:14-1:6:19",
|
|
||||||
"path": [
|
|
||||||
{
|
|
||||||
"unquoted_string": {
|
|
||||||
"range": "TestCompile/patterns/single-glob/defaults.d2,1:1:14-1:6:19",
|
|
||||||
"value": [
|
|
||||||
{
|
|
||||||
"string": "shape",
|
|
||||||
"raw_string": "shape"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"primary": {},
|
|
||||||
"value": {
|
|
||||||
"unquoted_string": {
|
|
||||||
"range": "TestCompile/patterns/single-glob/defaults.d2,1:8:21-1:12:25",
|
|
||||||
"value": [
|
|
||||||
{
|
|
||||||
"string": "page",
|
|
||||||
"raw_string": "page"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"string": {
|
"string": {
|
||||||
"range": "TestCompile/patterns/single-glob/defaults.d2,9:15:85-9:22:92",
|
"range": "TestCompile/patterns/single-glob/defaults.d2,9:15:85-9:22:92",
|
||||||
|
|
|
||||||
244
testdata/d2ir/TestCompile/patterns/triple-glob/defaults.exp.json
generated
vendored
244
testdata/d2ir/TestCompile/patterns/triple-glob/defaults.exp.json
generated
vendored
|
|
@ -578,6 +578,67 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"references": [
|
"references": [
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "shape",
|
||||||
|
"raw_string": "shape"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "shape",
|
||||||
|
"raw_string": "shape"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:12:19",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "shape",
|
||||||
|
"raw_string": "shape"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:8:15-1:12:19",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "page",
|
||||||
|
"raw_string": "page"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"string": {
|
"string": {
|
||||||
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
|
@ -716,6 +777,67 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"references": [
|
"references": [
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "shape",
|
||||||
|
"raw_string": "shape"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "shape",
|
||||||
|
"raw_string": "shape"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:12:19",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "shape",
|
||||||
|
"raw_string": "shape"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:8:15-1:12:19",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "page",
|
||||||
|
"raw_string": "page"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"string": {
|
"string": {
|
||||||
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
|
@ -854,6 +976,67 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"references": [
|
"references": [
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "shape",
|
||||||
|
"raw_string": "shape"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "shape",
|
||||||
|
"raw_string": "shape"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:12:19",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "shape",
|
||||||
|
"raw_string": "shape"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:8:15-1:12:19",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "page",
|
||||||
|
"raw_string": "page"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"string": {
|
"string": {
|
||||||
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
|
@ -992,6 +1175,67 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"references": [
|
"references": [
|
||||||
|
{
|
||||||
|
"string": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "shape",
|
||||||
|
"raw_string": "shape"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "shape",
|
||||||
|
"raw_string": "shape"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"context": {
|
||||||
|
"edge": null,
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:12:19",
|
||||||
|
"key": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "shape",
|
||||||
|
"raw_string": "shape"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:8:15-1:12:19",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "page",
|
||||||
|
"raw_string": "page"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"string": {
|
"string": {
|
||||||
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
"range": "TestCompile/patterns/triple-glob/defaults.d2,1:1:8-1:6:13",
|
||||||
|
|
|
||||||
4514
testdata/d2ir/TestCompile/patterns/triple-glob/edge-defaults.exp.json
generated
vendored
4514
testdata/d2ir/TestCompile/patterns/triple-glob/edge-defaults.exp.json
generated
vendored
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue