implement not filter
This commit is contained in:
parent
0b62ea83df
commit
7f84242f71
5 changed files with 1321 additions and 2 deletions
|
|
@ -660,6 +660,9 @@ func (mk1 *Key) D2OracleEquals(mk2 *Key) bool {
|
|||
if mk1.Ampersand != mk2.Ampersand {
|
||||
return false
|
||||
}
|
||||
if mk1.NotAmpersand != mk2.NotAmpersand {
|
||||
return false
|
||||
}
|
||||
if (mk1.Key == nil) != (mk2.Key == nil) {
|
||||
return false
|
||||
}
|
||||
|
|
@ -739,6 +742,9 @@ func (mk1 *Key) Equals(mk2 *Key) bool {
|
|||
if mk1.Ampersand != mk2.Ampersand {
|
||||
return false
|
||||
}
|
||||
if mk1.NotAmpersand != mk2.NotAmpersand {
|
||||
return false
|
||||
}
|
||||
if (mk1.Key == nil) != (mk2.Key == nil) {
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -408,6 +408,9 @@ func (c *compiler) ampersandFilterMap(dst *Map, ast, scopeAST *d2ast.Map) bool {
|
|||
ScopeMap: dst,
|
||||
ScopeAST: scopeAST,
|
||||
})
|
||||
if n.MapKey.NotAmpersand {
|
||||
ok = !ok
|
||||
}
|
||||
if !ok {
|
||||
if len(c.mapRefContextStack) == 0 {
|
||||
return false
|
||||
|
|
@ -591,7 +594,7 @@ func (c *compiler) compileKey(refctx *RefContext) {
|
|||
}
|
||||
|
||||
func (c *compiler) compileField(dst *Map, kp *d2ast.KeyPath, refctx *RefContext) {
|
||||
if refctx.Key.Ampersand {
|
||||
if refctx.Key.Ampersand || refctx.Key.NotAmpersand {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -607,7 +610,7 @@ func (c *compiler) compileField(dst *Map, kp *d2ast.KeyPath, refctx *RefContext)
|
|||
}
|
||||
|
||||
func (c *compiler) ampersandFilter(refctx *RefContext) bool {
|
||||
if !refctx.Key.Ampersand {
|
||||
if !refctx.Key.Ampersand && !refctx.Key.NotAmpersand {
|
||||
return true
|
||||
}
|
||||
if len(c.mapRefContextStack) == 0 || !c.mapRefContextStack[len(c.mapRefContextStack)-1].Key.SupportsGlobFilters() {
|
||||
|
|
|
|||
|
|
@ -225,6 +225,25 @@ classes: {
|
|||
assertQuery(t, m, 9, 3, nil, "")
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "not-basic",
|
||||
run: func(t testing.TB) {
|
||||
m, err := compile(t, `jacob: {
|
||||
shape: circle
|
||||
}
|
||||
jeremy: {
|
||||
shape: rectangle
|
||||
}
|
||||
*: {
|
||||
!&shape: rectangle
|
||||
label: I'm not a rectangle
|
||||
}`)
|
||||
assert.Success(t, err)
|
||||
assertQuery(t, m, 2, 0, nil, "jacob")
|
||||
assertQuery(t, m, 1, 0, nil, "jeremy")
|
||||
assertQuery(t, m, 0, 0, "I'm not a rectangle", "jacob.label")
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
runa(t, tca)
|
||||
|
|
|
|||
653
testdata/d2ir/TestCompile/filters/errors/not-basic.exp.json
generated
vendored
Normal file
653
testdata/d2ir/TestCompile/filters/errors/not-basic.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,653 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "jacob",
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "shape",
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,7:10:71-7:19:80",
|
||||
"value": [
|
||||
{
|
||||
"string": "rectangle",
|
||||
"raw_string": "rectangle"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,1:1:10-1:6:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,1:1:10-1:6:15",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,1:1:10-1:6:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,1:1:10-1:14:23",
|
||||
"key": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,1:1:10-1:6:15",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,1:1:10-1:6:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,1:8:17-1:14:23",
|
||||
"value": [
|
||||
{
|
||||
"string": "circle",
|
||||
"raw_string": "circle"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": false,
|
||||
"due_to_lazy_glob": false
|
||||
},
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,7:3:64-7:8:69",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,7:3:64-7:8:69",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,7:3:64-7:8:69",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,7:1:62-7:19:80",
|
||||
"not_ampersand": true,
|
||||
"key": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,7:3:64-7:8:69",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,7:3:64-7:8:69",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,7:10:71-7:19:80",
|
||||
"value": [
|
||||
{
|
||||
"string": "rectangle",
|
||||
"raw_string": "rectangle"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": true,
|
||||
"due_to_lazy_glob": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "label",
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,8:8:89-8:27:108",
|
||||
"value": [
|
||||
{
|
||||
"string": "I'm not a rectangle",
|
||||
"raw_string": "I'm not a rectangle"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,8:1:82-8:6:87",
|
||||
"value": [
|
||||
{
|
||||
"string": "label",
|
||||
"raw_string": "label"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,8:1:82-8:6:87",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,8:1:82-8:6:87",
|
||||
"value": [
|
||||
{
|
||||
"string": "label",
|
||||
"raw_string": "label"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,8:1:82-8:27:108",
|
||||
"key": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,8:1:82-8:6:87",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,8:1:82-8:6:87",
|
||||
"value": [
|
||||
{
|
||||
"string": "label",
|
||||
"raw_string": "label"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,8:8:89-8:27:108",
|
||||
"value": [
|
||||
{
|
||||
"string": "I'm not a rectangle",
|
||||
"raw_string": "I'm not a rectangle"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": true,
|
||||
"due_to_lazy_glob": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"edges": null
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,0:0:0-0:5:5",
|
||||
"value": [
|
||||
{
|
||||
"string": "jacob",
|
||||
"raw_string": "jacob"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,0:0:0-0:5:5",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,0:0:0-0:5:5",
|
||||
"value": [
|
||||
{
|
||||
"string": "jacob",
|
||||
"raw_string": "jacob"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,0:0:0-2:1:25",
|
||||
"key": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,0:0:0-0:5:5",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,0:0:0-0:5:5",
|
||||
"value": [
|
||||
{
|
||||
"string": "jacob",
|
||||
"raw_string": "jacob"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"map": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,0:7:7-2:1:25",
|
||||
"nodes": [
|
||||
{
|
||||
"map_key": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,1:1:10-1:14:23",
|
||||
"key": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,1:1:10-1:6:15",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,1:1:10-1:6:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,1:8:17-1:14:23",
|
||||
"value": [
|
||||
{
|
||||
"string": "circle",
|
||||
"raw_string": "circle"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": false,
|
||||
"due_to_lazy_glob": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "jeremy",
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "shape",
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,7:10:71-7:19:80",
|
||||
"value": [
|
||||
{
|
||||
"string": "rectangle",
|
||||
"raw_string": "rectangle"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,4:1:37-4:6:42",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,4:1:37-4:6:42",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,4:1:37-4:6:42",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,4:1:37-4:17:53",
|
||||
"key": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,4:1:37-4:6:42",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,4:1:37-4:6:42",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,4:8:44-4:17:53",
|
||||
"value": [
|
||||
{
|
||||
"string": "rectangle",
|
||||
"raw_string": "rectangle"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": false,
|
||||
"due_to_lazy_glob": false
|
||||
},
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,7:3:64-7:8:69",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,7:3:64-7:8:69",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,7:3:64-7:8:69",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,7:1:62-7:19:80",
|
||||
"not_ampersand": true,
|
||||
"key": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,7:3:64-7:8:69",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,7:3:64-7:8:69",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,7:10:71-7:19:80",
|
||||
"value": [
|
||||
{
|
||||
"string": "rectangle",
|
||||
"raw_string": "rectangle"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": true,
|
||||
"due_to_lazy_glob": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "label",
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,8:8:89-8:27:108",
|
||||
"value": [
|
||||
{
|
||||
"string": "I'm not a rectangle",
|
||||
"raw_string": "I'm not a rectangle"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,8:1:82-8:6:87",
|
||||
"value": [
|
||||
{
|
||||
"string": "label",
|
||||
"raw_string": "label"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,8:1:82-8:6:87",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,8:1:82-8:6:87",
|
||||
"value": [
|
||||
{
|
||||
"string": "label",
|
||||
"raw_string": "label"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,8:1:82-8:27:108",
|
||||
"key": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,8:1:82-8:6:87",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,8:1:82-8:6:87",
|
||||
"value": [
|
||||
{
|
||||
"string": "label",
|
||||
"raw_string": "label"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,8:8:89-8:27:108",
|
||||
"value": [
|
||||
{
|
||||
"string": "I'm not a rectangle",
|
||||
"raw_string": "I'm not a rectangle"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": true,
|
||||
"due_to_lazy_glob": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"edges": null
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,3:0:26-3:6:32",
|
||||
"value": [
|
||||
{
|
||||
"string": "jeremy",
|
||||
"raw_string": "jeremy"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,3:0:26-3:6:32",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,3:0:26-3:6:32",
|
||||
"value": [
|
||||
{
|
||||
"string": "jeremy",
|
||||
"raw_string": "jeremy"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,3:0:26-5:1:55",
|
||||
"key": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,3:0:26-3:6:32",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,3:0:26-3:6:32",
|
||||
"value": [
|
||||
{
|
||||
"string": "jeremy",
|
||||
"raw_string": "jeremy"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"map": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,3:8:34-5:1:55",
|
||||
"nodes": [
|
||||
{
|
||||
"map_key": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,4:1:37-4:17:53",
|
||||
"key": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,4:1:37-4:6:42",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,4:1:37-4:6:42",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/errors/not-basic.d2,4:8:44-4:17:53",
|
||||
"value": [
|
||||
{
|
||||
"string": "rectangle",
|
||||
"raw_string": "rectangle"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": false,
|
||||
"due_to_lazy_glob": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"edges": null
|
||||
}
|
||||
638
testdata/d2ir/TestCompile/filters/not-basic.exp.json
generated
vendored
Normal file
638
testdata/d2ir/TestCompile/filters/not-basic.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,638 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "jacob",
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "shape",
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/not-basic.d2,1:8:17-1:14:23",
|
||||
"value": [
|
||||
{
|
||||
"string": "circle",
|
||||
"raw_string": "circle"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,1:1:10-1:6:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/filters/not-basic.d2,1:1:10-1:6:15",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,1:1:10-1:6:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/filters/not-basic.d2,1:1:10-1:14:23",
|
||||
"key": {
|
||||
"range": "TestCompile/filters/not-basic.d2,1:1:10-1:6:15",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,1:1:10-1:6:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,1:8:17-1:14:23",
|
||||
"value": [
|
||||
{
|
||||
"string": "circle",
|
||||
"raw_string": "circle"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": false,
|
||||
"due_to_lazy_glob": false
|
||||
},
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,7:3:64-7:8:69",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/filters/not-basic.d2,7:3:64-7:8:69",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,7:3:64-7:8:69",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/filters/not-basic.d2,7:1:62-7:19:80",
|
||||
"not_ampersand": true,
|
||||
"key": {
|
||||
"range": "TestCompile/filters/not-basic.d2,7:3:64-7:8:69",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,7:3:64-7:8:69",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,7:10:71-7:19:80",
|
||||
"value": [
|
||||
{
|
||||
"string": "rectangle",
|
||||
"raw_string": "rectangle"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": true,
|
||||
"due_to_lazy_glob": false
|
||||
},
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,7:3:64-7:8:69",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/filters/not-basic.d2,7:3:64-7:8:69",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,7:3:64-7:8:69",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/filters/not-basic.d2,7:1:62-7:19:80",
|
||||
"not_ampersand": true,
|
||||
"key": {
|
||||
"range": "TestCompile/filters/not-basic.d2,7:3:64-7:8:69",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,7:3:64-7:8:69",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,7:10:71-7:19:80",
|
||||
"value": [
|
||||
{
|
||||
"string": "rectangle",
|
||||
"raw_string": "rectangle"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": true,
|
||||
"due_to_lazy_glob": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "label",
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/not-basic.d2,8:8:89-8:27:108",
|
||||
"value": [
|
||||
{
|
||||
"string": "I'm not a rectangle",
|
||||
"raw_string": "I'm not a rectangle"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,8:1:82-8:6:87",
|
||||
"value": [
|
||||
{
|
||||
"string": "label",
|
||||
"raw_string": "label"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/filters/not-basic.d2,8:1:82-8:6:87",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,8:1:82-8:6:87",
|
||||
"value": [
|
||||
{
|
||||
"string": "label",
|
||||
"raw_string": "label"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/filters/not-basic.d2,8:1:82-8:27:108",
|
||||
"key": {
|
||||
"range": "TestCompile/filters/not-basic.d2,8:1:82-8:6:87",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,8:1:82-8:6:87",
|
||||
"value": [
|
||||
{
|
||||
"string": "label",
|
||||
"raw_string": "label"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,8:8:89-8:27:108",
|
||||
"value": [
|
||||
{
|
||||
"string": "I'm not a rectangle",
|
||||
"raw_string": "I'm not a rectangle"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": true,
|
||||
"due_to_lazy_glob": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"edges": null
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,0:0:0-0:5:5",
|
||||
"value": [
|
||||
{
|
||||
"string": "jacob",
|
||||
"raw_string": "jacob"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/filters/not-basic.d2,0:0:0-0:5:5",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,0:0:0-0:5:5",
|
||||
"value": [
|
||||
{
|
||||
"string": "jacob",
|
||||
"raw_string": "jacob"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/filters/not-basic.d2,0:0:0-2:1:25",
|
||||
"key": {
|
||||
"range": "TestCompile/filters/not-basic.d2,0:0:0-0:5:5",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,0:0:0-0:5:5",
|
||||
"value": [
|
||||
{
|
||||
"string": "jacob",
|
||||
"raw_string": "jacob"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"map": {
|
||||
"range": "TestCompile/filters/not-basic.d2,0:7:7-2:1:25",
|
||||
"nodes": [
|
||||
{
|
||||
"map_key": {
|
||||
"range": "TestCompile/filters/not-basic.d2,1:1:10-1:14:23",
|
||||
"key": {
|
||||
"range": "TestCompile/filters/not-basic.d2,1:1:10-1:6:15",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,1:1:10-1:6:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,1:8:17-1:14:23",
|
||||
"value": [
|
||||
{
|
||||
"string": "circle",
|
||||
"raw_string": "circle"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": false,
|
||||
"due_to_lazy_glob": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "jeremy",
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "shape",
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/not-basic.d2,4:8:44-4:17:53",
|
||||
"value": [
|
||||
{
|
||||
"string": "rectangle",
|
||||
"raw_string": "rectangle"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,4:1:37-4:6:42",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/filters/not-basic.d2,4:1:37-4:6:42",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,4:1:37-4:6:42",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/filters/not-basic.d2,4:1:37-4:17:53",
|
||||
"key": {
|
||||
"range": "TestCompile/filters/not-basic.d2,4:1:37-4:6:42",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,4:1:37-4:6:42",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,4:8:44-4:17:53",
|
||||
"value": [
|
||||
{
|
||||
"string": "rectangle",
|
||||
"raw_string": "rectangle"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": false,
|
||||
"due_to_lazy_glob": false
|
||||
},
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,7:3:64-7:8:69",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/filters/not-basic.d2,7:3:64-7:8:69",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,7:3:64-7:8:69",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/filters/not-basic.d2,7:1:62-7:19:80",
|
||||
"not_ampersand": true,
|
||||
"key": {
|
||||
"range": "TestCompile/filters/not-basic.d2,7:3:64-7:8:69",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,7:3:64-7:8:69",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,7:10:71-7:19:80",
|
||||
"value": [
|
||||
{
|
||||
"string": "rectangle",
|
||||
"raw_string": "rectangle"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": true,
|
||||
"due_to_lazy_glob": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"edges": null
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,3:0:26-3:6:32",
|
||||
"value": [
|
||||
{
|
||||
"string": "jeremy",
|
||||
"raw_string": "jeremy"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/filters/not-basic.d2,3:0:26-3:6:32",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,3:0:26-3:6:32",
|
||||
"value": [
|
||||
{
|
||||
"string": "jeremy",
|
||||
"raw_string": "jeremy"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/filters/not-basic.d2,3:0:26-5:1:55",
|
||||
"key": {
|
||||
"range": "TestCompile/filters/not-basic.d2,3:0:26-3:6:32",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,3:0:26-3:6:32",
|
||||
"value": [
|
||||
{
|
||||
"string": "jeremy",
|
||||
"raw_string": "jeremy"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"map": {
|
||||
"range": "TestCompile/filters/not-basic.d2,3:8:34-5:1:55",
|
||||
"nodes": [
|
||||
{
|
||||
"map_key": {
|
||||
"range": "TestCompile/filters/not-basic.d2,4:1:37-4:17:53",
|
||||
"key": {
|
||||
"range": "TestCompile/filters/not-basic.d2,4:1:37-4:6:42",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,4:1:37-4:6:42",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/filters/not-basic.d2,4:8:44-4:17:53",
|
||||
"value": [
|
||||
{
|
||||
"string": "rectangle",
|
||||
"raw_string": "rectangle"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": false,
|
||||
"due_to_lazy_glob": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"edges": null
|
||||
}
|
||||
Loading…
Reference in a new issue