Merge pull request #1552 from nhooyr/lazy-globs

d2ir: Implement lazy globs and triple glob
This commit is contained in:
Anmol Sethi 2023-09-05 02:03:20 -07:00 committed by GitHub
commit dd131f83ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
117 changed files with 88789 additions and 8416 deletions

View file

@ -606,6 +606,15 @@ func (m *Map) IsFileMap() bool {
return m.Range.Start.Line == 0 && m.Range.Start.Column == 0
}
func (m *Map) HasFilter() bool {
for _, n := range m.Nodes {
if n.MapKey != nil && (n.MapKey.Ampersand || n.MapKey.NotAmpersand) {
return true
}
}
return false
}
// TODO: require @ on import values for readability
type Key struct {
Range Range `json:"range"`
@ -641,8 +650,7 @@ type Key struct {
Value ValueBox `json:"value"`
}
// TODO maybe need to compare Primary
func (mk1 *Key) Equals(mk2 *Key) bool {
func (mk1 *Key) D2OracleEquals(mk2 *Key) bool {
if mk1.Ampersand != mk2.Ampersand {
return false
}
@ -715,6 +723,98 @@ func (mk1 *Key) Equals(mk2 *Key) bool {
return true
}
func (mk1 *Key) Equals(mk2 *Key) bool {
if mk1.Ampersand != mk2.Ampersand {
return false
}
if (mk1.Key == nil) != (mk2.Key == nil) {
return false
}
if (mk1.EdgeIndex == nil) != (mk2.EdgeIndex == nil) {
return false
}
if mk1.EdgeIndex != nil {
if !mk1.EdgeIndex.Equals(mk2.EdgeIndex) {
return false
}
}
if (mk1.EdgeKey == nil) != (mk2.EdgeKey == nil) {
return false
}
if len(mk1.Edges) != len(mk2.Edges) {
return false
}
for i := range mk1.Edges {
if !mk1.Edges[i].Equals(mk2.Edges[i]) {
return false
}
}
if (mk1.Value.Map == nil) != (mk2.Value.Map == nil) {
if mk1.Value.Map != nil && len(mk1.Value.Map.Nodes) > 0 {
return false
}
if mk2.Value.Map != nil && len(mk2.Value.Map.Nodes) > 0 {
return false
}
} else if (mk1.Value.Unbox() == nil) != (mk2.Value.Unbox() == nil) {
return false
}
if mk1.Key != nil {
if len(mk1.Key.Path) != len(mk2.Key.Path) {
return false
}
for i, id := range mk1.Key.Path {
if id.Unbox().ScalarString() != mk2.Key.Path[i].Unbox().ScalarString() {
return false
}
}
}
if mk1.EdgeKey != nil {
if len(mk1.EdgeKey.Path) != len(mk2.EdgeKey.Path) {
return false
}
for i, id := range mk1.EdgeKey.Path {
if id.Unbox().ScalarString() != mk2.EdgeKey.Path[i].Unbox().ScalarString() {
return false
}
}
}
if mk1.Value.Map != nil && len(mk1.Value.Map.Nodes) > 0 {
if len(mk1.Value.Map.Nodes) != len(mk2.Value.Map.Nodes) {
return false
}
for i := range mk1.Value.Map.Nodes {
if !mk1.Value.Map.Nodes[i].MapKey.Equals(mk2.Value.Map.Nodes[i].MapKey) {
return false
}
}
}
if mk1.Value.Unbox() != nil {
if (mk1.Value.ScalarBox().Unbox() == nil) != (mk2.Value.ScalarBox().Unbox() == nil) {
return false
}
if mk1.Value.ScalarBox().Unbox() != nil {
if mk1.Value.ScalarBox().Unbox().ScalarString() != mk2.Value.ScalarBox().Unbox().ScalarString() {
return false
}
}
}
if mk1.Primary.Unbox() != nil {
if (mk1.Primary.Unbox() == nil) != (mk2.Primary.Unbox() == nil) {
return false
}
if mk1.Primary.ScalarString() != mk2.Primary.ScalarString() {
return false
}
}
return true
}
func (mk *Key) SetScalar(scalar ScalarBox) {
if mk.Value.Unbox() != nil && mk.Value.ScalarBox().Unbox() == nil {
mk.Primary = scalar
@ -723,7 +823,43 @@ func (mk *Key) SetScalar(scalar ScalarBox) {
}
}
func (mk *Key) HasQueryGlob() bool {
func (mk *Key) HasGlob() bool {
if mk.Key.HasGlob() {
return true
}
for _, e := range mk.Edges {
if e.Src.HasGlob() || e.Dst.HasGlob() {
return true
}
}
if mk.EdgeIndex != nil && mk.EdgeIndex.Glob {
return true
}
if mk.EdgeKey.HasGlob() {
return true
}
return false
}
func (mk *Key) HasTripleGlob() bool {
if mk.Key.HasTripleGlob() {
return true
}
for _, e := range mk.Edges {
if e.Src.HasTripleGlob() || e.Dst.HasTripleGlob() {
return true
}
}
if mk.EdgeIndex != nil && mk.EdgeIndex.Glob {
return true
}
if mk.EdgeKey.HasTripleGlob() {
return true
}
return false
}
func (mk *Key) SupportsGlobFilters() bool {
if mk.Key.HasGlob() && len(mk.Edges) == 0 {
return true
}
@ -736,6 +872,11 @@ func (mk *Key) HasQueryGlob() bool {
return false
}
func (mk *Key) Copy() *Key {
mk2 := *mk
return &mk2
}
type KeyPath struct {
Range Range `json:"range"`
Path []*StringBox `json:"path"`
@ -763,16 +904,16 @@ func (kp *KeyPath) Copy() *KeyPath {
return &kp2
}
func (kp *KeyPath) HasDoubleGlob() bool {
if kp == nil {
return false
}
for _, el := range kp.Path {
if el.UnquotedString != nil && el.ScalarString() == "**" {
return true
}
}
return false
func (kp *KeyPath) Last() *StringBox {
return kp.Path[len(kp.Path)-1]
}
func IsDoubleGlob(pattern []string) bool {
return len(pattern) == 3 && pattern[0] == "*" && pattern[1] == "" && pattern[2] == "*"
}
func IsTripleGlob(pattern []string) bool {
return len(pattern) == 5 && pattern[0] == "*" && pattern[1] == "" && pattern[2] == "*" && pattern[3] == "" && pattern[4] == "*"
}
func (kp *KeyPath) HasGlob() bool {
@ -787,6 +928,54 @@ func (kp *KeyPath) HasGlob() bool {
return false
}
func (kp *KeyPath) FirstGlob() int {
if kp == nil {
return -1
}
for i, el := range kp.Path {
if el.UnquotedString != nil && len(el.UnquotedString.Pattern) > 0 {
return i
}
}
return -1
}
func (kp *KeyPath) HasTripleGlob() bool {
if kp == nil {
return false
}
for _, el := range kp.Path {
if el.UnquotedString != nil && IsTripleGlob(el.UnquotedString.Pattern) {
return true
}
}
return false
}
func (kp *KeyPath) HasMultiGlob() bool {
if kp == nil {
return false
}
for _, el := range kp.Path {
if el.UnquotedString != nil && (IsDoubleGlob(el.UnquotedString.Pattern) || IsTripleGlob(el.UnquotedString.Pattern)) {
return true
}
}
return false
}
func (kp1 *KeyPath) Equals(kp2 *KeyPath) bool {
if len(kp1.Path) != len(kp2.Path) {
return false
}
for i, id := range kp1.Path {
if id.Unbox().ScalarString() != kp2.Path[i].Unbox().ScalarString() {
return false
}
}
return true
}
type Edge struct {
Range Range `json:"range"`
@ -799,6 +988,22 @@ type Edge struct {
DstArrow string `json:"dst_arrow"`
}
func (e1 *Edge) Equals(e2 *Edge) bool {
if !e1.Src.Equals(e2.Src) {
return false
}
if e1.SrcArrow != e2.SrcArrow {
return false
}
if !e1.Dst.Equals(e2.Dst) {
return false
}
if e1.DstArrow != e2.DstArrow {
return false
}
return true
}
type EdgeIndex struct {
Range Range `json:"range"`
@ -807,6 +1012,16 @@ type EdgeIndex struct {
Glob bool `json:"glob"`
}
func (ei1 *EdgeIndex) Equals(ei2 *EdgeIndex) bool {
if ei1.Int != ei2.Int {
return false
}
if ei1.Glob != ei2.Glob {
return false
}
return true
}
type Substitution struct {
Range Range `json:"range"`
@ -1082,6 +1297,10 @@ func (sb ScalarBox) Unbox() Scalar {
}
}
func (sb ScalarBox) ScalarString() string {
return sb.Unbox().ScalarString()
}
// StringBox is used to box String for JSON persistence.
type StringBox struct {
UnquotedString *UnquotedString `json:"unquoted_string,omitempty"`

View file

@ -322,21 +322,21 @@ func (c *compiler) compileField(obj *d2graph.Object, f *d2ir.Field) {
}
for _, fr := range f.References {
if fr.Primary() {
if fr.Context.Key.Value.Map != nil {
obj.Map = fr.Context.Key.Value.Map
if fr.Context_.Key.Value.Map != nil {
obj.Map = fr.Context_.Key.Value.Map
}
}
r := d2graph.Reference{
Key: fr.KeyPath,
KeyPathIndex: fr.KeyPathIndex(),
MapKey: fr.Context.Key,
MapKeyEdgeIndex: fr.Context.EdgeIndex(),
Scope: fr.Context.Scope,
ScopeAST: fr.Context.ScopeAST,
MapKey: fr.Context_.Key,
MapKeyEdgeIndex: fr.Context_.EdgeIndex(),
Scope: fr.Context_.Scope,
ScopeAST: fr.Context_.ScopeAST,
}
if fr.Context.ScopeMap != nil && !d2ir.IsVar(fr.Context.ScopeMap) {
scopeObjIDA := d2graphIDA(d2ir.BoardIDA(fr.Context.ScopeMap))
if fr.Context_.ScopeMap != nil && !d2ir.IsVar(fr.Context_.ScopeMap) {
scopeObjIDA := d2graphIDA(d2ir.BoardIDA(fr.Context_.ScopeMap))
r.ScopeObj = obj.Graph.Root.EnsureChild(scopeObjIDA)
}
obj.References = append(obj.References, r)
@ -725,14 +725,14 @@ func (c *compiler) compileEdge(obj *d2graph.Object, e *d2ir.Edge) {
edge.Label.MapKey = e.LastPrimaryKey()
for _, er := range e.References {
r := d2graph.EdgeReference{
Edge: er.Context.Edge,
MapKey: er.Context.Key,
MapKeyEdgeIndex: er.Context.EdgeIndex(),
Scope: er.Context.Scope,
ScopeAST: er.Context.ScopeAST,
Edge: er.Context_.Edge,
MapKey: er.Context_.Key,
MapKeyEdgeIndex: er.Context_.EdgeIndex(),
Scope: er.Context_.Scope,
ScopeAST: er.Context_.ScopeAST,
}
if er.Context.ScopeMap != nil && !d2ir.IsVar(er.Context.ScopeMap) {
scopeObjIDA := d2graphIDA(d2ir.BoardIDA(er.Context.ScopeMap))
if er.Context_.ScopeMap != nil && !d2ir.IsVar(er.Context_.ScopeMap) {
scopeObjIDA := d2graphIDA(d2ir.BoardIDA(er.Context_.ScopeMap))
r.ScopeObj = edge.Src.Graph.Root.EnsureChild(scopeObjIDA)
}
edge.References = append(edge.References, r)

View file

@ -2745,6 +2745,7 @@ func TestCompile2(t *testing.T) {
t.Run("seqdiagrams", testSeqDiagrams)
t.Run("nulls", testNulls)
t.Run("vars", testVars)
t.Run("globs", testGlobs)
}
func testBoards(t *testing.T) {
@ -4032,6 +4033,86 @@ z: {
})
}
func testGlobs(t *testing.T) {
t.Parallel()
tca := []struct {
name string
skip bool
run func(t *testing.T)
}{
{
name: "alixander-lazy-globs-review/1",
run: func(t *testing.T) {
assertCompile(t, `
***.style.fill: yellow
**.shape: circle
*.style.multiple: true
x: {
y
}
layers: {
next: {
a
}
}
`, "")
},
},
{
name: "alixander-lazy-globs-review/2",
run: func(t *testing.T) {
assertCompile(t, `
**.style.fill: yellow
scenarios: {
b: {
a -> b
}
}
`, "")
},
},
{
name: "alixander-lazy-globs-review/3",
run: func(t *testing.T) {
assertCompile(t, `
***: {
c: d
}
***: {
style.fill: red
}
table: {
shape: sql_table
a: b
}
class: {
shape: class
a: b
}
`, "")
},
},
}
for _, tc := range tca {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
if tc.skip {
t.SkipNow()
}
tc.run(t)
})
}
}
func assertCompile(t *testing.T, text string, expErr string) (*d2graph.Graph, *d2target.Config) {
d2Path := fmt.Sprintf("d2/testdata/d2compiler/%v.d2", t.Name())
g, config, err := d2compiler.Compile(d2Path, strings.NewReader(text), nil)

View file

@ -5,14 +5,25 @@ import (
"strconv"
"strings"
"oss.terrastruct.com/util-go/go2"
"oss.terrastruct.com/d2/d2ast"
"oss.terrastruct.com/d2/d2format"
"oss.terrastruct.com/d2/d2parser"
"oss.terrastruct.com/d2/d2themes"
"oss.terrastruct.com/d2/d2themes/d2themescatalog"
"oss.terrastruct.com/util-go/go2"
)
type globContext struct {
root *globContext
refctx *RefContext
// Set of BoardIDA that this glob has already applied to.
appliedFields map[string]struct{}
// Set of Edge IDs that this glob has already applied to.
appliedEdges map[string]struct{}
}
type compiler struct {
err *d2parser.ParseError
@ -23,7 +34,13 @@ type compiler struct {
importCache map[string]*Map
utf16Pos bool
globStack []bool
// Stack of globs that must be recomputed at each new object in and below the current scope.
globContextStack [][]*globContext
// Used to prevent field globs causing infinite loops.
globRefContextStack []*RefContext
// Used to check whether ampersands are allowed in the current map.
mapRefContextStack []*RefContext
lazyGlobBeingApplied bool
}
type CompileOptions struct {
@ -49,8 +66,8 @@ func Compile(ast *d2ast.Map, opts *CompileOptions) (*Map, error) {
}
m := &Map{}
m.initRoot()
m.parent.(*Field).References[0].Context.Scope = ast
m.parent.(*Field).References[0].Context.ScopeAST = ast
m.parent.(*Field).References[0].Context_.Scope = ast
m.parent.(*Field).References[0].Context_.ScopeAST = ast
c.pushImportStack(&d2ast.Import{
Path: []*d2ast.StringBox{d2ast.RawStringBox(ast.GetRange().Path, true)},
@ -83,7 +100,7 @@ func (c *compiler) overlayClasses(m *Map) {
for _, lf := range layers.Fields {
if lf.Map() == nil || lf.Primary() != nil {
c.errorf(lf.References[0].Context.Key, "invalid layer")
c.errorf(lf.References[0].Context_.Key, "invalid layer")
continue
}
l := lf.Map()
@ -337,7 +354,7 @@ func (c *compiler) resolveSubstitution(vars *Map, substitution *d2ast.Substituti
func (c *compiler) overlay(base *Map, f *Field) {
if f.Map() == nil || f.Primary() != nil {
c.errorf(f.References[0].Context.Key, "invalid %s", NodeBoardKind(f))
c.errorf(f.References[0].Context_.Key, "invalid %s", NodeBoardKind(f))
return
}
base = base.CopyBase(f)
@ -345,7 +362,26 @@ func (c *compiler) overlay(base *Map, f *Field) {
f.Composite = base
}
func (c *compiler) compileMap(dst *Map, ast, scopeAST *d2ast.Map) {
func (g *globContext) copy() *globContext {
g2 := *g
g2.refctx = g.root.refctx.Copy()
return &g2
}
func (g *globContext) prefixed(dst *Map) *globContext {
g2 := g.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) ampersandFilterMap(dst *Map, ast, scopeAST *d2ast.Map) bool {
for _, n := range ast.Nodes {
switch {
case n.MapKey != nil:
@ -356,10 +392,55 @@ func (c *compiler) compileMap(dst *Map, ast, scopeAST *d2ast.Map) {
ScopeAST: scopeAST,
})
if !ok {
return
// Unapply glob if appropriate.
gctx := c.getGlobContext(c.mapRefContextStack[len(c.mapRefContextStack)-1])
if gctx == nil {
return false
}
var ks string
if gctx.refctx.Key.HasTripleGlob() {
ks = d2format.Format(d2ast.MakeKeyPath(IDA(dst)))
} else {
ks = d2format.Format(d2ast.MakeKeyPath(BoardIDA(dst)))
}
delete(gctx.appliedFields, ks)
return false
}
}
}
return true
}
func (c *compiler) compileMap(dst *Map, ast, scopeAST *d2ast.Map) {
var globs []*globContext
if len(c.globContextStack) > 0 {
previousGlobs := c.globContextStack[len(c.globContextStack)-1]
if NodeBoardKind(dst) == BoardLayer {
for _, g := range previousGlobs {
if g.refctx.Key.HasTripleGlob() {
globs = append(globs, g.prefixed(dst))
}
}
} else if NodeBoardKind(dst) != "" {
// Make all globs relative to the scenario or step.
for _, g := range previousGlobs {
globs = append(globs, g.prefixed(dst))
}
} else {
globs = append(globs, previousGlobs...)
}
}
c.globContextStack = append(c.globContextStack, globs)
defer func() {
dst.globs = c.globContexts()
c.globContextStack = c.globContextStack[:len(c.globContextStack)-1]
}()
ok := c.ampersandFilterMap(dst, ast, scopeAST)
if !ok {
return
}
for _, n := range ast.Nodes {
switch {
case n.MapKey != nil:
@ -389,6 +470,17 @@ func (c *compiler) compileMap(dst *Map, ast, scopeAST *d2ast.Map) {
c.errorf(n.Import, "cannot spread import non map into map")
continue
}
for _, gctx := range impn.Map().globs {
if !gctx.refctx.Key.HasTripleGlob() {
continue
}
gctx2 := gctx.copy()
gctx2.refctx.ScopeMap = dst
c.compileKey(gctx2.refctx)
c.ensureGlobContext(gctx2.refctx)
}
OverlayMap(dst, impn.Map())
if impnf, ok := impn.(*Field); ok {
@ -403,12 +495,68 @@ func (c *compiler) compileMap(dst *Map, ast, scopeAST *d2ast.Map) {
}
}
func (c *compiler) globContexts() []*globContext {
return c.globContextStack[len(c.globContextStack)-1]
}
func (c *compiler) getGlobContext(refctx *RefContext) *globContext {
for _, gctx := range c.globContexts() {
if gctx.refctx.Equal(refctx) {
return gctx
}
}
return nil
}
func (c *compiler) ensureGlobContext(refctx *RefContext) *globContext {
gctx := c.getGlobContext(refctx)
if gctx != nil {
return gctx
}
gctx = &globContext{
refctx: refctx,
appliedFields: make(map[string]struct{}),
appliedEdges: make(map[string]struct{}),
}
gctx.root = gctx
c.globContextStack[len(c.globContextStack)-1] = append(c.globContexts(), gctx)
return gctx
}
func (c *compiler) compileKey(refctx *RefContext) {
if refctx.Key.HasGlob() {
// These printlns are for debugging infinite loops.
// println("og", refctx.Edge, refctx.Key, refctx.Scope, refctx.ScopeMap, refctx.ScopeAST)
for _, refctx2 := range c.globRefContextStack {
// println("st", refctx2.Edge, refctx2.Key, refctx2.Scope, refctx2.ScopeMap, refctx2.ScopeAST)
if refctx.Equal(refctx2) {
// Break the infinite loop.
return
}
// println("keys", d2format.Format(refctx2.Key), d2format.Format(refctx.Key))
}
c.globRefContextStack = append(c.globRefContextStack, refctx)
defer func() {
c.globRefContextStack = c.globRefContextStack[:len(c.globRefContextStack)-1]
}()
c.ensureGlobContext(refctx)
}
oldFields := refctx.ScopeMap.FieldCountRecursive()
oldEdges := refctx.ScopeMap.EdgeCountRecursive()
if len(refctx.Key.Edges) == 0 {
c.compileField(refctx.ScopeMap, refctx.Key.Key, refctx)
} else {
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))
old := c.lazyGlobBeingApplied
c.lazyGlobBeingApplied = true
c.compileKey(gctx2.refctx)
c.lazyGlobBeingApplied = old
}
}
}
func (c *compiler) compileField(dst *Map, kp *d2ast.KeyPath, refctx *RefContext) {
@ -416,7 +564,7 @@ func (c *compiler) compileField(dst *Map, kp *d2ast.KeyPath, refctx *RefContext)
return
}
fa, err := dst.EnsureField(kp, refctx, true)
fa, err := dst.EnsureField(kp, refctx, true, c)
if err != nil {
c.err.Errors = append(c.err.Errors, err.(d2ast.Error))
return
@ -431,7 +579,7 @@ func (c *compiler) ampersandFilter(refctx *RefContext) bool {
if !refctx.Key.Ampersand {
return true
}
if len(c.globStack) == 0 || !c.globStack[len(c.globStack)-1] {
if len(c.mapRefContextStack) == 0 || !c.mapRefContextStack[len(c.mapRefContextStack)-1].Key.SupportsGlobFilters() {
c.errorf(refctx.Key, "glob filters cannot be used outside globs")
return false
}
@ -439,13 +587,50 @@ func (c *compiler) ampersandFilter(refctx *RefContext) bool {
return true
}
fa, err := refctx.ScopeMap.EnsureField(refctx.Key.Key, refctx, false)
fa, err := refctx.ScopeMap.EnsureField(refctx.Key.Key, refctx, false, c)
if err != nil {
c.err.Errors = append(c.err.Errors, err.(d2ast.Error))
return false
}
if len(fa) == 0 {
return false
if refctx.Key.Key.Last().ScalarString() != "label" {
return false
}
kp := refctx.Key.Key.Copy()
kp.Path = kp.Path[:len(kp.Path)-1]
if len(kp.Path) == 0 {
n := refctx.ScopeMap.Parent()
switch n := n.(type) {
case *Field:
fa = append(fa, n)
case *Edge:
if n.Primary_ == nil {
if refctx.Key.Value.ScalarBox().Unbox().ScalarString() == "" {
return true
}
return false
}
if n.Primary_.Value.ScalarString() != refctx.Key.Value.ScalarBox().Unbox().ScalarString() {
return false
}
}
} else {
fa, err = refctx.ScopeMap.EnsureField(kp, refctx, false, c)
if err != nil {
c.err.Errors = append(c.err.Errors, err.(d2ast.Error))
return false
}
}
for _, f := range fa {
label := f.Name
if f.Primary_ != nil {
label = f.Primary_.Value.ScalarString()
}
if label != refctx.Key.Value.ScalarBox().Unbox().ScalarString() {
return false
}
}
return true
}
for _, f := range fa {
ok := c._ampersandFilter(f, refctx)
@ -484,7 +669,22 @@ func (c *compiler) _ampersandFilter(f *Field, refctx *RefContext) bool {
}
func (c *compiler) _compileField(f *Field, refctx *RefContext) {
if len(refctx.Key.Edges) == 0 && refctx.Key.Value.Null != nil {
// In case of filters, we need to pass filters before continuing
if refctx.Key.Value.Map != nil && refctx.Key.Value.Map.HasFilter() {
if f.Map() == nil {
f.Composite = &Map{
parent: f,
}
}
c.mapRefContextStack = append(c.mapRefContextStack, refctx)
ok := c.ampersandFilterMap(f.Map(), refctx.Key.Value.Map, refctx.ScopeAST)
c.mapRefContextStack = c.mapRefContextStack[:len(c.mapRefContextStack)-1]
if !ok {
return
}
}
if len(refctx.Key.Edges) == 0 && (refctx.Key.Primary.Null != nil || refctx.Key.Value.Null != nil) {
// For vars, if we delete the field, it may just resolve to an outer scope var of the same name
// Instead we keep it around, so that resolveSubstitutions can find it
if !IsVar(ParentMap(f)) {
@ -494,11 +694,15 @@ func (c *compiler) _compileField(f *Field, refctx *RefContext) {
}
if refctx.Key.Primary.Unbox() != nil {
if c.ignoreLazyGlob(f) {
return
}
f.Primary_ = &Scalar{
parent: f,
Value: refctx.Key.Primary.Unbox(),
}
}
if refctx.Key.Value.Array != nil {
a := &Array{
parent: f,
@ -506,35 +710,37 @@ func (c *compiler) _compileField(f *Field, refctx *RefContext) {
c.compileArray(a, refctx.Key.Value.Array, refctx.ScopeAST)
f.Composite = a
} else if refctx.Key.Value.Map != nil {
scopeAST := refctx.Key.Value.Map
if f.Map() == nil {
f.Composite = &Map{
parent: f,
}
}
scopeAST := refctx.Key.Value.Map
switch NodeBoardKind(f) {
case BoardScenario:
c.overlay(ParentBoard(f).Map(), f)
case BoardStep:
stepsMap := ParentMap(f)
for i := range stepsMap.Fields {
if stepsMap.Fields[i] == f {
if i == 0 {
c.overlay(ParentBoard(f).Map(), f)
} else {
c.overlay(stepsMap.Fields[i-1].Map(), f)
switch NodeBoardKind(f) {
case BoardScenario:
c.overlay(ParentBoard(f).Map(), f)
case BoardStep:
stepsMap := ParentMap(f)
for i := range stepsMap.Fields {
if stepsMap.Fields[i] == f {
if i == 0 {
c.overlay(ParentBoard(f).Map(), f)
} else {
c.overlay(stepsMap.Fields[i-1].Map(), f)
}
break
}
break
}
case BoardLayer:
default:
// If new board type, use that as the new scope AST, otherwise, carry on
scopeAST = refctx.ScopeAST
}
case BoardLayer:
default:
// If new board type, use that as the new scope AST, otherwise, carry on
} else {
scopeAST = refctx.ScopeAST
}
c.globStack = append(c.globStack, refctx.Key.HasQueryGlob())
c.mapRefContextStack = append(c.mapRefContextStack, refctx)
c.compileMap(f.Map(), refctx.Key.Value.Map, scopeAST)
c.globStack = c.globStack[:len(c.globStack)-1]
c.mapRefContextStack = c.mapRefContextStack[:len(c.mapRefContextStack)-1]
switch NodeBoardKind(f) {
case BoardScenario, BoardStep:
c.overlayClasses(f.Map())
@ -580,6 +786,9 @@ func (c *compiler) _compileField(f *Field, refctx *RefContext) {
}
}
} else if refctx.Key.Value.ScalarBox().Unbox() != nil {
if c.ignoreLazyGlob(f) {
return
}
f.Primary_ = &Scalar{
parent: f,
Value: refctx.Key.Value.ScalarBox().Unbox(),
@ -591,6 +800,17 @@ func (c *compiler) _compileField(f *Field, refctx *RefContext) {
}
}
// Whether the current lazy glob being applied should not override the field
// if already set by a non glob key.
func (c *compiler) ignoreLazyGlob(n Node) bool {
if c.lazyGlobBeingApplied && n.Primary() != nil {
if n.LastPrimaryRef() != nil {
return true
}
}
return false
}
func (c *compiler) updateLinks(m *Map) {
for _, f := range m.Fields {
if f.Name == "link" {
@ -692,7 +912,7 @@ func (c *compiler) compileEdges(refctx *RefContext) {
return
}
fa, err := refctx.ScopeMap.EnsureField(refctx.Key.Key, refctx, true)
fa, err := refctx.ScopeMap.EnsureField(refctx.Key.Key, refctx, true, c)
if err != nil {
c.err.Errors = append(c.err.Errors, err.(d2ast.Error))
return
@ -726,21 +946,25 @@ func (c *compiler) _compileEdges(refctx *RefContext) {
var ea []*Edge
if eid.Index != nil || eid.Glob {
ea = refctx.ScopeMap.GetEdges(eid, refctx)
ea = refctx.ScopeMap.GetEdges(eid, refctx, c)
if len(ea) == 0 {
c.errorf(refctx.Edge, "indexed edge does not exist")
if !eid.Glob {
c.errorf(refctx.Edge, "indexed edge does not exist")
}
continue
}
for _, e := range ea {
e.References = append(e.References, &EdgeReference{
Context: refctx,
Context_: refctx,
DueToGlob_: len(c.globRefContextStack) > 0,
DueToLazyGlob_: c.lazyGlobBeingApplied,
})
refctx.ScopeMap.appendFieldReferences(0, refctx.Edge.Src, refctx)
refctx.ScopeMap.appendFieldReferences(0, refctx.Edge.Dst, refctx)
refctx.ScopeMap.appendFieldReferences(0, refctx.Edge.Src, refctx, c)
refctx.ScopeMap.appendFieldReferences(0, refctx.Edge.Dst, refctx, c)
}
} else {
var err error
ea, err = refctx.ScopeMap.CreateEdge(eid, refctx)
ea, err = refctx.ScopeMap.CreateEdge(eid, refctx, c)
if err != nil {
c.err.Errors = append(c.err.Errors, err.(d2ast.Error))
continue
@ -757,6 +981,9 @@ func (c *compiler) _compileEdges(refctx *RefContext) {
c.compileField(e.Map_, refctx.Key.EdgeKey, refctx)
} else {
if refctx.Key.Primary.Unbox() != nil {
if c.ignoreLazyGlob(e) {
return
}
e.Primary_ = &Scalar{
parent: e,
Value: refctx.Key.Primary.Unbox(),
@ -771,10 +998,13 @@ func (c *compiler) _compileEdges(refctx *RefContext) {
parent: e,
}
}
c.globStack = append(c.globStack, refctx.Key.HasQueryGlob())
c.mapRefContextStack = append(c.mapRefContextStack, refctx)
c.compileMap(e.Map_, refctx.Key.Value.Map, refctx.ScopeAST)
c.globStack = c.globStack[:len(c.globStack)-1]
c.mapRefContextStack = c.mapRefContextStack[:len(c.mapRefContextStack)-1]
} else if refctx.Key.Value.ScalarBox().Unbox() != nil {
if c.ignoreLazyGlob(e) {
return
}
e.Primary_ = &Scalar{
parent: e,
Value: refctx.Key.Value.ScalarBox().Unbox(),

View file

@ -107,7 +107,7 @@ func assertQuery(t testing.TB, n d2ir.Node, nfields, nedges int, primary interfa
}
if len(na) == 0 {
return nil
t.Fatalf("query didn't match anything")
}
return na[0]
@ -416,10 +416,27 @@ scenarios: {
}
}`)
assert.Success(t, err)
assertQuery(t, m, 8, 2, nil, "")
assertQuery(t, m, 0, 0, nil, "(a -> b)[0]")
},
},
{
name: "multiple-scenario-map",
run: func(t testing.TB) {
m, err := compile(t, `a -> b: { style.opacity: 0.3 }
scenarios: {
1: {
(a -> b)[0].style.opacity: 0.1
}
1: {
z
}
}`)
assert.Success(t, err)
assertQuery(t, m, 11, 2, nil, "")
assertQuery(t, m, 0, 0, 0.1, "scenarios.1.(a -> b)[0].style.opacity")
},
},
}
runa(t, tca)
}

View file

@ -13,6 +13,7 @@ import (
"oss.terrastruct.com/d2/d2format"
"oss.terrastruct.com/d2/d2graph"
"oss.terrastruct.com/d2/d2parser"
"oss.terrastruct.com/d2/d2target"
)
// Most errors returned by a node should be created with d2parser.Errorf
@ -29,6 +30,7 @@ type Node interface {
fmt.Stringer
LastRef() Reference
LastPrimaryRef() Reference
LastPrimaryKey() *d2ast.Key
}
@ -110,6 +112,10 @@ func (n *Scalar) LastRef() Reference { return parentRef(n) }
func (n *Map) LastRef() Reference { return parentRef(n) }
func (n *Array) LastRef() Reference { return parentRef(n) }
func (n *Scalar) LastPrimaryRef() Reference { return parentPrimaryRef(n) }
func (n *Map) LastPrimaryRef() Reference { return parentPrimaryRef(n) }
func (n *Array) LastPrimaryRef() Reference { return parentPrimaryRef(n) }
func (n *Scalar) LastPrimaryKey() *d2ast.Key { return parentPrimaryKey(n) }
func (n *Map) LastPrimaryKey() *d2ast.Key { return parentPrimaryKey(n) }
func (n *Array) LastPrimaryKey() *d2ast.Key { return parentPrimaryKey(n) }
@ -119,13 +125,23 @@ type Reference interface {
// Most specific AST node for the reference.
AST() d2ast.Node
Primary() bool
Context() *RefContext
// Result of a glob in Context or from above.
DueToGlob() bool
DueToLazyGlob() bool
}
var _ Reference = &FieldReference{}
var _ Reference = &EdgeReference{}
func (r *FieldReference) reference() {}
func (r *EdgeReference) reference() {}
func (r *FieldReference) reference() {}
func (r *EdgeReference) reference() {}
func (r *FieldReference) Context() *RefContext { return r.Context_ }
func (r *EdgeReference) Context() *RefContext { return r.Context_ }
func (r *FieldReference) DueToGlob() bool { return r.DueToGlob_ }
func (r *EdgeReference) DueToGlob() bool { return r.DueToGlob_ }
func (r *FieldReference) DueToLazyGlob() bool { return r.DueToLazyGlob_ }
func (r *EdgeReference) DueToLazyGlob() bool { return r.DueToLazyGlob_ }
type Scalar struct {
parent Node
@ -154,13 +170,15 @@ type Map struct {
parent Node
Fields []*Field `json:"fields"`
Edges []*Edge `json:"edges"`
globs []*globContext
}
func (m *Map) initRoot() {
m.parent = &Field{
Name: "root",
References: []*FieldReference{{
Context: &RefContext{
Context_: &RefContext{
ScopeMap: m,
},
}},
@ -245,7 +263,11 @@ func NodeBoardKind(n Node) BoardKind {
}
f = ParentField(n)
case *Map:
f = ParentField(n)
var ok bool
f, ok = n.parent.(*Field)
if !ok {
return ""
}
if f.Root() {
return BoardLayer
}
@ -295,9 +317,9 @@ func (f *Field) Copy(newParent Node) Node {
return f
}
func (f *Field) lastPrimaryRef() *FieldReference {
func (f *Field) LastPrimaryRef() Reference {
for i := len(f.References) - 1; i >= 0; i-- {
if f.References[i].Primary() {
if f.References[i].Primary() && !f.References[i].DueToLazyGlob() {
return f.References[i]
}
}
@ -305,11 +327,11 @@ func (f *Field) lastPrimaryRef() *FieldReference {
}
func (f *Field) LastPrimaryKey() *d2ast.Key {
fr := f.lastPrimaryRef()
fr := f.LastPrimaryRef()
if fr == nil {
return nil
}
return fr.Context.Key
return fr.(*FieldReference).Context_.Key
}
func (f *Field) LastRef() Reference {
@ -451,10 +473,10 @@ func (e *Edge) Copy(newParent Node) Node {
return e
}
func (e *Edge) lastPrimaryRef() *EdgeReference {
func (e *Edge) LastPrimaryRef() Reference {
for i := len(e.References) - 1; i >= 0; i-- {
fr := e.References[i]
if fr.Context.Key.EdgeKey == nil {
if fr.Context_.Key.EdgeKey == nil && !fr.DueToLazyGlob() {
return fr
}
}
@ -462,11 +484,11 @@ func (e *Edge) lastPrimaryRef() *EdgeReference {
}
func (e *Edge) LastPrimaryKey() *d2ast.Key {
er := e.lastPrimaryRef()
er := e.LastPrimaryRef()
if er == nil {
return nil
}
return er.Context.Key
return er.(*EdgeReference).Context_.Key
}
func (e *Edge) LastRef() Reference {
@ -494,16 +516,18 @@ type FieldReference struct {
String d2ast.String `json:"string"`
KeyPath *d2ast.KeyPath `json:"key_path"`
Context *RefContext `json:"context"`
Context_ *RefContext `json:"context"`
DueToGlob_ bool `json:"due_to_glob"`
DueToLazyGlob_ bool `json:"due_to_lazy_glob"`
}
// Primary returns true if the Value in Context.Key.Value corresponds to the Field
// represented by String.
func (fr *FieldReference) Primary() bool {
if fr.KeyPath == fr.Context.Key.Key {
return len(fr.Context.Key.Edges) == 0 && fr.KeyPathIndex() == len(fr.KeyPath.Path)-1
} else if fr.KeyPath == fr.Context.Key.EdgeKey {
return len(fr.Context.Key.Edges) == 1 && fr.KeyPathIndex() == len(fr.KeyPath.Path)-1
if fr.KeyPath == fr.Context_.Key.Key {
return len(fr.Context_.Key.Edges) == 0 && fr.KeyPathIndex() == len(fr.KeyPath.Path)-1
} else if fr.KeyPath == fr.Context_.Key.EdgeKey {
return len(fr.Context_.Key.Edges) == 1 && fr.KeyPathIndex() == len(fr.KeyPath.Path)-1
}
return false
}
@ -518,33 +542,35 @@ func (fr *FieldReference) KeyPathIndex() int {
}
func (fr *FieldReference) EdgeDest() bool {
return fr.KeyPath == fr.Context.Edge.Dst
return fr.KeyPath == fr.Context_.Edge.Dst
}
func (fr *FieldReference) InEdge() bool {
return fr.Context.Edge != nil
return fr.Context_.Edge != nil
}
func (fr *FieldReference) AST() d2ast.Node {
if fr.String == nil {
// Root map.
return fr.Context.Scope
return fr.Context_.Scope
}
return fr.String
}
type EdgeReference struct {
Context *RefContext `json:"context"`
Context_ *RefContext `json:"context"`
DueToGlob_ bool `json:"due_to_glob"`
DueToLazyGlob_ bool `json:"due_to_lazy_glob"`
}
func (er *EdgeReference) AST() d2ast.Node {
return er.Context.Edge
return er.Context_.Edge
}
// Primary returns true if the Value in Context.Key.Value corresponds to the *Edge
// represented by Context.Edge
func (er *EdgeReference) Primary() bool {
return len(er.Context.Key.Edges) == 1 && er.Context.Key.EdgeKey == nil
return len(er.Context_.Key.Edges) == 1 && er.Context_.Key.EdgeKey == nil
}
type RefContext struct {
@ -569,6 +595,12 @@ func (rc *RefContext) EdgeIndex() int {
return -1
}
func (rc *RefContext) Equal(rc2 *RefContext) bool {
// We intentionally ignore edges here because the same glob can produce multiple RefContexts that should be treated the same with only the edge as the difference.
// Same with ScopeMap.
return rc.Key.Equals(rc2.Key) && rc.Scope == rc2.Scope && rc.ScopeAST == rc2.ScopeAST
}
func (m *Map) FieldCountRecursive() int {
if m == nil {
return 0
@ -667,7 +699,7 @@ func (m *Map) getField(ida []string) *Field {
}
// EnsureField is a bit of a misnomer. It's more of a Query/Ensure combination function at this point.
func (m *Map) EnsureField(kp *d2ast.KeyPath, refctx *RefContext, create bool) ([]*Field, error) {
func (m *Map) EnsureField(kp *d2ast.KeyPath, refctx *RefContext, create bool, c *compiler) ([]*Field, error) {
i := 0
for kp.Path[i].Unbox().ScalarString() == "_" {
m = ParentMap(m)
@ -680,26 +712,77 @@ func (m *Map) EnsureField(kp *d2ast.KeyPath, refctx *RefContext, create bool) ([
i++
}
var gctx *globContext
if refctx != nil && refctx.Key.HasGlob() && c != nil {
gctx = c.getGlobContext(refctx)
}
var fa []*Field
err := m.ensureField(i, kp, refctx, create, &fa)
err := m.ensureField(i, kp, refctx, create, gctx, c, &fa)
if len(fa) > 0 && c != nil && len(c.globRefContextStack) == 0 {
for _, gctx2 := range c.globContexts() {
old := c.lazyGlobBeingApplied
c.lazyGlobBeingApplied = true
c.compileKey(gctx2.refctx)
c.lazyGlobBeingApplied = old
}
}
return fa, err
}
func (m *Map) ensureField(i int, kp *d2ast.KeyPath, refctx *RefContext, create bool, 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 {
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)))
}
if !kp.HasGlob() {
if !passthrough {
gctx.appliedFields[ks] = struct{}{}
}
return true
}
// 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. And only for globs with edge indexes.
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 _, ok := gctx.appliedFields[ks]; ok {
return false
}
}
if !passthrough {
gctx.appliedFields[ks] = struct{}{}
}
}
return true
}
faAppend := func(fa2 ...*Field) {
for _, f := range fa2 {
if filter(f, false) {
*fa = append(*fa, f)
}
}
}
us, ok := kp.Path[i].Unbox().(*d2ast.UnquotedString)
if ok && us.Pattern != nil {
fa2, ok := m.doubleGlob(us.Pattern)
fa2, ok := m.multiGlob(us.Pattern)
if ok {
if i == len(kp.Path)-1 {
*fa = append(*fa, fa2...)
faAppend(fa2...)
} else {
for _, f := range fa2 {
if !filter(f, true) {
continue
}
if f.Map() == nil {
f.Composite = &Map{
parent: f,
}
}
err := f.Map().ensureField(i+1, kp, refctx, create, fa)
err := f.Map().ensureField(i+1, kp, refctx, create, gctx, c, fa)
if err != nil {
return err
}
@ -710,14 +793,17 @@ func (m *Map) ensureField(i int, kp *d2ast.KeyPath, refctx *RefContext, create b
for _, f := range m.Fields {
if matchPattern(f.Name, us.Pattern) {
if i == len(kp.Path)-1 {
*fa = append(*fa, f)
faAppend(f)
} else {
if !filter(f, true) {
continue
}
if f.Map() == nil {
f.Composite = &Map{
parent: f,
}
}
err := f.Map().ensureField(i+1, kp, refctx, create, fa)
err := f.Map().ensureField(i+1, kp, refctx, create, gctx, c, fa)
if err != nil {
return err
}
@ -756,14 +842,19 @@ func (m *Map) ensureField(i int, kp *d2ast.KeyPath, refctx *RefContext, create b
// Don't add references for fake common KeyPath from trimCommon in CreateEdge.
if refctx != nil {
f.References = append(f.References, &FieldReference{
String: kp.Path[i].Unbox(),
KeyPath: kp,
Context: refctx,
String: kp.Path[i].Unbox(),
KeyPath: kp,
Context_: refctx,
DueToGlob_: len(c.globRefContextStack) > 0,
DueToLazyGlob_: c.lazyGlobBeingApplied,
})
}
if i+1 == len(kp.Path) {
*fa = append(*fa, f)
faAppend(f)
return nil
}
if !filter(f, true) {
return nil
}
if _, ok := f.Composite.(*Array); ok {
@ -774,33 +865,61 @@ func (m *Map) ensureField(i int, kp *d2ast.KeyPath, refctx *RefContext, create b
parent: f,
}
}
return f.Map().ensureField(i+1, kp, refctx, create, fa)
return f.Map().ensureField(i+1, kp, refctx, create, gctx, c, fa)
}
if !create {
return nil
}
shape := ParentShape(m)
if _, ok := d2graph.ReservedKeywords[strings.ToLower(head)]; !ok && len(c.globRefContextStack) > 0 {
if shape == d2target.ShapeClass || shape == d2target.ShapeSQLTable {
return nil
}
}
f := &Field{
parent: m,
Name: head,
}
defer func() {
if i < kp.FirstGlob() {
return
}
for _, grefctx := range c.globRefContextStack {
var ks string
if grefctx.Key.HasTripleGlob() {
ks = d2format.Format(d2ast.MakeKeyPath(IDA(f)))
} else {
ks = d2format.Format(d2ast.MakeKeyPath(BoardIDA(f)))
}
gctx2 := c.getGlobContext(grefctx)
gctx2.appliedFields[ks] = struct{}{}
}
}()
// Don't add references for fake common KeyPath from trimCommon in CreateEdge.
if refctx != nil {
f.References = append(f.References, &FieldReference{
String: kp.Path[i].Unbox(),
KeyPath: kp,
Context: refctx,
String: kp.Path[i].Unbox(),
KeyPath: kp,
Context_: refctx,
DueToGlob_: len(c.globRefContextStack) > 0,
DueToLazyGlob_: c.lazyGlobBeingApplied,
})
}
if !filter(f, true) {
return nil
}
m.Fields = append(m.Fields, f)
if i+1 == len(kp.Path) {
*fa = append(*fa, f)
faAppend(f)
return nil
}
f.Composite = &Map{
parent: f,
if f.Composite == nil {
f.Composite = &Map{
parent: f,
}
}
return f.Map().ensureField(i+1, kp, refctx, create, fa)
return f.Map().ensureField(i+1, kp, refctx, create, gctx, c, fa)
}
func (m *Map) DeleteEdge(eid *EdgeID) *Edge {
@ -833,7 +952,7 @@ func (m *Map) DeleteField(ida ...string) *Field {
for _, fr := range f.References {
for _, e := range m.Edges {
for _, er := range e.References {
if er.Context == fr.Context {
if er.Context_ == fr.Context_ {
m.DeleteEdge(e.ID)
break
}
@ -865,10 +984,14 @@ func (m *Map) DeleteField(ida ...string) *Field {
return nil
}
func (m *Map) GetEdges(eid *EdgeID, refctx *RefContext) []*Edge {
func (m *Map) GetEdges(eid *EdgeID, refctx *RefContext, c *compiler) []*Edge {
if refctx != nil {
var gctx *globContext
if refctx.Key.HasGlob() && c != nil {
gctx = c.ensureGlobContext(refctx)
}
var ea []*Edge
m.getEdges(eid, refctx, &ea)
m.getEdges(eid, refctx, gctx, &ea)
return ea
}
@ -882,7 +1005,7 @@ func (m *Map) GetEdges(eid *EdgeID, refctx *RefContext) []*Edge {
return nil
}
if f.Map() != nil {
return f.Map().GetEdges(eid, nil)
return f.Map().GetEdges(eid, nil, nil)
}
return nil
}
@ -896,7 +1019,7 @@ func (m *Map) GetEdges(eid *EdgeID, refctx *RefContext) []*Edge {
return ea
}
func (m *Map) getEdges(eid *EdgeID, refctx *RefContext, ea *[]*Edge) error {
func (m *Map) getEdges(eid *EdgeID, refctx *RefContext, gctx *globContext, ea *[]*Edge) error {
eid, m, common, err := eid.resolve(m)
if err != nil {
return err
@ -914,7 +1037,7 @@ func (m *Map) getEdges(eid *EdgeID, refctx *RefContext, ea *[]*Edge) error {
}
}
}
fa, err := m.EnsureField(commonKP, nil, false)
fa, err := m.EnsureField(commonKP, nil, false, nil)
if err != nil {
return nil
}
@ -927,7 +1050,7 @@ func (m *Map) getEdges(eid *EdgeID, refctx *RefContext, ea *[]*Edge) error {
parent: f,
}
}
err = f.Map().getEdges(eid, refctx, ea)
err = f.Map().getEdges(eid, refctx, gctx, ea)
if err != nil {
return err
}
@ -935,11 +1058,11 @@ func (m *Map) getEdges(eid *EdgeID, refctx *RefContext, ea *[]*Edge) error {
return nil
}
srcFA, err := refctx.ScopeMap.EnsureField(refctx.Edge.Src, nil, false)
srcFA, err := refctx.ScopeMap.EnsureField(refctx.Edge.Src, nil, false, nil)
if err != nil {
return err
}
dstFA, err := refctx.ScopeMap.EnsureField(refctx.Edge.Dst, nil, false)
dstFA, err := refctx.ScopeMap.EnsureField(refctx.Edge.Dst, nil, false, nil)
if err != nil {
return err
}
@ -950,19 +1073,46 @@ func (m *Map) getEdges(eid *EdgeID, refctx *RefContext, ea *[]*Edge) error {
eid2.SrcPath = RelIDA(m, src)
eid2.DstPath = RelIDA(m, dst)
ea2 := m.GetEdges(eid2, nil)
*ea = append(*ea, ea2...)
ea2 := m.GetEdges(eid2, nil, nil)
for _, e := range ea2 {
if gctx != nil {
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 {
continue
}
gctx.appliedEdges[ks] = struct{}{}
}
*ea = append(*ea, ea2...)
}
}
}
return nil
}
func (m *Map) CreateEdge(eid *EdgeID, refctx *RefContext) ([]*Edge, error) {
func (m *Map) CreateEdge(eid *EdgeID, refctx *RefContext, c *compiler) ([]*Edge, error) {
var ea []*Edge
return ea, m.createEdge(eid, refctx, &ea)
var gctx *globContext
if refctx != nil && refctx.Key.HasGlob() && c != nil {
gctx = c.ensureGlobContext(refctx)
}
err := m.createEdge(eid, refctx, gctx, c, &ea)
if len(ea) > 0 && c != nil && len(c.globRefContextStack) == 0 {
for _, gctx2 := range c.globContexts() {
old := c.lazyGlobBeingApplied
c.lazyGlobBeingApplied = true
c.compileKey(gctx2.refctx)
c.lazyGlobBeingApplied = old
}
}
return ea, err
}
func (m *Map) createEdge(eid *EdgeID, refctx *RefContext, ea *[]*Edge) error {
func (m *Map) createEdge(eid *EdgeID, refctx *RefContext, gctx *globContext, c *compiler, ea *[]*Edge) error {
if ParentEdge(m) != nil {
return d2parser.Errorf(refctx.Edge, "cannot create edge inside edge")
}
@ -983,7 +1133,7 @@ func (m *Map) createEdge(eid *EdgeID, refctx *RefContext, ea *[]*Edge) error {
}
}
}
fa, err := m.EnsureField(commonKP, nil, true)
fa, err := m.EnsureField(commonKP, nil, true, c)
if err != nil {
return err
}
@ -996,7 +1146,7 @@ func (m *Map) createEdge(eid *EdgeID, refctx *RefContext, ea *[]*Edge) error {
parent: f,
}
}
err = f.Map().createEdge(eid, refctx, ea)
err = f.Map().createEdge(eid, refctx, gctx, c, ea)
if err != nil {
return err
}
@ -1022,11 +1172,11 @@ func (m *Map) createEdge(eid *EdgeID, refctx *RefContext, ea *[]*Edge) error {
return d2parser.Errorf(refctx.Edge.Dst.Path[ij].Unbox(), "edge with board keyword alone doesn't make sense")
}
srcFA, err := refctx.ScopeMap.EnsureField(refctx.Edge.Src, refctx, true)
srcFA, err := refctx.ScopeMap.EnsureField(refctx.Edge.Src, refctx, true, c)
if err != nil {
return err
}
dstFA, err := refctx.ScopeMap.EnsureField(refctx.Edge.Dst, refctx, true)
dstFA, err := refctx.ScopeMap.EnsureField(refctx.Edge.Dst, refctx, true, c)
if err != nil {
return err
}
@ -1038,21 +1188,21 @@ func (m *Map) createEdge(eid *EdgeID, refctx *RefContext, ea *[]*Edge) error {
continue
}
if refctx.Edge.Src.HasDoubleGlob() {
if refctx.Edge.Src.HasMultiGlob() {
// If src has a double glob we only select leafs, those without children.
if src.Map().IsContainer() {
continue
}
if ParentBoard(src) != ParentBoard(dst) {
if NodeBoardKind(src) != "" || ParentBoard(src) != ParentBoard(dst) {
continue
}
}
if refctx.Edge.Dst.HasDoubleGlob() {
if refctx.Edge.Dst.HasMultiGlob() {
// If dst has a double glob we only select leafs, those without children.
if dst.Map().IsContainer() {
continue
}
if ParentBoard(src) != ParentBoard(dst) {
if NodeBoardKind(dst) != "" || ParentBoard(src) != ParentBoard(dst) {
continue
}
}
@ -1060,17 +1210,20 @@ func (m *Map) createEdge(eid *EdgeID, refctx *RefContext, ea *[]*Edge) error {
eid2 := eid.Copy()
eid2.SrcPath = RelIDA(m, src)
eid2.DstPath = RelIDA(m, dst)
e, err := m.createEdge2(eid2, refctx, src, dst)
e, err := m.createEdge2(eid2, refctx, gctx, c, src, dst)
if err != nil {
return err
}
*ea = append(*ea, e)
if e != nil {
*ea = append(*ea, e)
}
}
}
return nil
}
func (m *Map) createEdge2(eid *EdgeID, refctx *RefContext, src, dst *Field) (*Edge, error) {
func (m *Map) createEdge2(eid *EdgeID, refctx *RefContext, gctx *globContext, c *compiler, src, dst *Field) (*Edge, error) {
if NodeBoardKind(src) != "" {
return nil, d2parser.Errorf(refctx.Edge.Src, "cannot create edges between boards")
}
@ -1083,7 +1236,7 @@ func (m *Map) createEdge2(eid *EdgeID, refctx *RefContext, src, dst *Field) (*Ed
eid.Index = nil
eid.Glob = true
ea := m.GetEdges(eid, nil)
ea := m.GetEdges(eid, nil, nil)
index := len(ea)
eid.Index = &index
eid.Glob = false
@ -1091,9 +1244,29 @@ func (m *Map) createEdge2(eid *EdgeID, refctx *RefContext, src, dst *Field) (*Ed
parent: m,
ID: eid,
References: []*EdgeReference{{
Context: refctx,
Context_: refctx,
DueToGlob_: len(c.globRefContextStack) > 0,
DueToLazyGlob_: c.lazyGlobBeingApplied,
}},
}
if gctx != nil {
var ks string
// We only ever want to create one of the edge per glob so we filter without the edge index.
e2 := e.Copy(e.Parent()).(*Edge)
e2.ID = e2.ID.Copy()
e2.ID.Index = nil
if refctx.Key.HasTripleGlob() {
ks = d2format.Format(d2ast.MakeKeyPath(IDA(e2)))
} else {
ks = d2format.Format(d2ast.MakeKeyPath(BoardIDA(e2)))
}
if _, ok := gctx.appliedEdges[ks]; ok {
return nil, nil
}
gctx.appliedEdges[ks] = struct{}{}
}
m.Edges = append(m.Edges, e)
return e, nil
@ -1148,6 +1321,18 @@ func (e *Edge) AST() d2ast.Node {
return k
}
func (e *Edge) IDString() string {
ast := e.AST().(*d2ast.Key)
if e.ID.Index != nil {
ast.EdgeIndex = &d2ast.EdgeIndex{
Int: e.ID.Index,
}
}
ast.Primary = d2ast.ScalarBox{}
ast.Value = d2ast.ValueBox{}
return d2format.Format(ast)
}
func (a *Array) AST() d2ast.Node {
if a == nil {
return nil
@ -1178,7 +1363,7 @@ func (m *Map) AST() d2ast.Node {
return astMap
}
func (m *Map) appendFieldReferences(i int, kp *d2ast.KeyPath, refctx *RefContext) {
func (m *Map) appendFieldReferences(i int, kp *d2ast.KeyPath, refctx *RefContext, c *compiler) {
sb := kp.Path[i]
f := m.GetField(sb.Unbox().ScalarString())
if f == nil {
@ -1186,15 +1371,17 @@ func (m *Map) appendFieldReferences(i int, kp *d2ast.KeyPath, refctx *RefContext
}
f.References = append(f.References, &FieldReference{
String: sb.Unbox(),
KeyPath: kp,
Context: refctx,
String: sb.Unbox(),
KeyPath: kp,
Context_: refctx,
DueToGlob_: len(c.globRefContextStack) > 0,
DueToLazyGlob_: c.lazyGlobBeingApplied,
})
if i+1 == len(kp.Path) {
return
}
if f.Map() != nil {
f.Map().appendFieldReferences(i+1, kp, refctx)
f.Map().appendFieldReferences(i+1, kp, refctx, c)
}
}
@ -1268,6 +1455,24 @@ func ParentEdge(n Node) *Edge {
}
}
func ParentShape(n Node) string {
for {
f, ok := n.(*Field)
if ok {
if f.Map() != nil {
shapef := f.Map().GetField("shape")
if shapef != nil && shapef.Primary() != nil {
return shapef.Primary().Value.ScalarString()
}
}
}
n = n.Parent()
if n == nil {
return ""
}
}
}
func countUnderscores(p []string) int {
for i, el := range p {
if el != "_" {
@ -1310,6 +1515,18 @@ func parentRef(n Node) Reference {
return nil
}
func parentPrimaryRef(n Node) Reference {
f := ParentField(n)
if f != nil {
return f.LastPrimaryRef()
}
e := ParentEdge(n)
if e != nil {
return e.LastPrimaryRef()
}
return nil
}
func parentPrimaryKey(n Node) *d2ast.Key {
f := ParentField(n)
if f != nil {
@ -1325,60 +1542,65 @@ func parentPrimaryKey(n Node) *d2ast.Key {
// BoardIDA returns the absolute path to n from the nearest board root.
func BoardIDA(n Node) (ida []string) {
for {
f, ok := n.(*Field)
if ok {
if f.Root() || NodeBoardKind(f) != "" {
switch n := n.(type) {
case *Field:
if n.Root() || NodeBoardKind(n) != "" {
reverseIDA(ida)
return ida
}
ida = append(ida, f.Name)
ida = append(ida, n.Name)
case *Edge:
ida = append(ida, n.IDString())
}
f = ParentField(n)
if f == nil {
n = n.Parent()
if n == nil {
reverseIDA(ida)
return ida
}
n = f
}
}
// IDA returns the absolute path to n.
func IDA(n Node) (ida []string) {
for {
f, ok := n.(*Field)
if ok {
ida = append(ida, f.Name)
if f.Root() {
switch n := n.(type) {
case *Field:
ida = append(ida, n.Name)
if n.Root() {
reverseIDA(ida)
return ida
}
case *Edge:
ida = append(ida, n.IDString())
}
f = ParentField(n)
if f == nil {
n = n.Parent()
if n == nil {
reverseIDA(ida)
return ida
}
n = f
}
}
// RelIDA returns the path to n relative to p.
func RelIDA(p, n Node) (ida []string) {
for {
f, ok := n.(*Field)
if ok {
ida = append(ida, f.Name)
if f.Root() {
switch n := n.(type) {
case *Field:
ida = append(ida, n.Name)
if n.Root() {
reverseIDA(ida)
return ida
}
case *Edge:
ida = append(ida, n.String())
}
f = ParentField(n)
if f == nil || f.Root() || f == p || f.Composite == p {
n = n.Parent()
f, fok := n.(*Field)
e, eok := n.(*Edge)
if n == nil || (fok && (f.Root() || f == p || f.Composite == p)) || (eok && (e == p || e.Map_ == p)) {
reverseIDA(ida)
return ida
}
n = f
}
}
@ -1476,7 +1698,7 @@ func (m *Map) InClass(key *d2ast.Key) bool {
}
for _, ref := range classF.References {
if ref.Context.Key == key {
if ref.Context_.Key == key {
return true
}
}

View file

@ -96,6 +96,120 @@ x -> y
assertQuery(t, m, 0, 0, nil, "(x -> y)[1]")
},
},
{
name: "label-filter/1",
run: func(t testing.TB) {
m, err := compile(t, `
x
y
p: p
a -> z: delta
*.style.opacity: 0.1
*: {
&label: x
style.opacity: 1
}
*: {
&label: p
style.opacity: 0.5
}
(* -> *)[*]: {
&label: delta
target-arrowhead.shape: diamond
}
`)
assert.Success(t, err)
assertQuery(t, m, 17, 1, nil, "")
assertQuery(t, m, 0, 0, 1, "x.style.opacity")
assertQuery(t, m, 0, 0, 0.1, "y.style.opacity")
assertQuery(t, m, 0, 0, 0.5, "p.style.opacity")
assertQuery(t, m, 0, 0, 0.1, "a.style.opacity")
assertQuery(t, m, 0, 0, 0.1, "z.style.opacity")
assertQuery(t, m, 0, 0, "diamond", "(a -> z).target-arrowhead.shape")
},
},
{
name: "label-filter/2",
run: func(t testing.TB) {
m, err := compile(t, `
(* -> *)[*].style.opacity: 0.1
(* -> *)[*]: {
&label: hi
style.opacity: 1
}
x -> y: hi
x -> y
`)
assert.Success(t, err)
assertQuery(t, m, 6, 2, nil, "")
assertQuery(t, m, 2, 0, "hi", "(x -> y)[0]")
assertQuery(t, m, 0, 0, 1, "(x -> y)[0].style.opacity")
assertQuery(t, m, 0, 0, 0.1, "(x -> y)[1].style.opacity")
},
},
{
name: "lazy-filter",
run: func(t testing.TB) {
m, err := compile(t, `
*: {
&label: a
style.fill: yellow
}
a
# if i remove this line, the glob applies as expected
b
b.label: a
`)
assert.Success(t, err)
assertQuery(t, m, 7, 0, nil, "")
assertQuery(t, m, 0, 0, "yellow", "a.style.fill")
assertQuery(t, m, 0, 0, "yellow", "b.style.fill")
},
},
{
name: "primary-filter",
run: func(t testing.TB) {
m, err := compile(t, `
parent: {
a -> b1
a -> b2
a -> b3
b1 -> c1
b1 -> c2
c1: {
c1-child.class: hidden
}
c2: {
C2-child.class: hidden
}
c2.class: hidden
b2.class: hidden
}
classes: {
hidden: {
style: {
fill: red
}
}
}
# Error
**: null {
&class: hidden
}
`)
assert.Success(t, err)
assertQuery(t, m, 9, 3, nil, "")
},
},
}
runa(t, tca)

View file

@ -108,7 +108,7 @@ func (c *compiler) __import(imp *d2ast.Import) (*Map, bool) {
ir = &Map{}
ir.initRoot()
ir.parent.(*Field).References[0].Context.Scope = ast
ir.parent.(*Field).References[0].Context_.Scope = ast
c.compileMap(ir, ast, ast)
@ -128,14 +128,14 @@ func nilScopeMap(n Node) {
}
case *Edge:
for _, r := range n.References {
r.Context.ScopeMap = nil
r.Context_.ScopeMap = nil
}
if n.Map() != nil {
nilScopeMap(n.Map())
}
case *Field:
for _, r := range n.References {
r.Context.ScopeMap = nil
r.Context_.ScopeMap = nil
}
if n.Map() != nil {
nilScopeMap(n.Map())

View file

@ -11,7 +11,7 @@ func OverlayMap(base, overlay *Map) {
}
for _, oe := range overlay.Edges {
bea := base.GetEdges(oe.ID, nil)
bea := base.GetEdges(oe.ID, nil, nil)
if len(bea) == 0 {
base.Edges = append(base.Edges, oe.Copy(base).(*Edge))
continue

View file

@ -3,32 +3,68 @@ package d2ir
import (
"strings"
"oss.terrastruct.com/d2/d2ast"
"oss.terrastruct.com/d2/d2graph"
)
func (m *Map) doubleGlob(pattern []string) ([]*Field, bool) {
if !(len(pattern) == 3 && pattern[0] == "*" && pattern[1] == "" && pattern[2] == "*") {
return nil, false
}
func (m *Map) multiGlob(pattern []string) ([]*Field, bool) {
var fa []*Field
m._doubleGlob(&fa)
return fa, true
if d2ast.IsDoubleGlob(pattern) {
m._doubleGlob(&fa)
return fa, true
}
if d2ast.IsTripleGlob(pattern) {
m._tripleGlob(&fa)
return fa, true
}
return nil, false
}
func (m *Map) _doubleGlob(fa *[]*Field) {
for _, f := range m.Fields {
if _, ok := d2graph.ReservedKeywords[f.Name]; ok {
if f.Name == "layers" {
continue
}
if _, ok := d2graph.BoardKeywords[f.Name]; !ok {
continue
}
// We don't ever want to append layers, scenarios or steps directly.
if f.Map() != nil {
f.Map()._tripleGlob(fa)
}
continue
}
if NodeBoardKind(f) == "" {
*fa = append(*fa, f)
}
*fa = append(*fa, f)
if f.Map() != nil {
f.Map()._doubleGlob(fa)
}
}
}
func (m *Map) _tripleGlob(fa *[]*Field) {
for _, f := range m.Fields {
if _, ok := d2graph.ReservedKeywords[f.Name]; ok {
if _, ok := d2graph.BoardKeywords[f.Name]; !ok {
continue
}
// We don't ever want to append layers, scenarios or steps directly.
if f.Map() != nil {
f.Map()._tripleGlob(fa)
}
continue
}
if NodeBoardKind(f) == "" {
*fa = append(*fa, f)
}
if f.Map() != nil {
f.Map()._tripleGlob(fa)
}
}
}
func matchPattern(s string, pattern []string) bool {
if len(pattern) == 0 {
return true

View file

@ -128,7 +128,7 @@ an* -> an*`)
assert.Success(t, err)
assertQuery(t, m, 2, 2, nil, "")
assertQuery(t, m, 0, 0, nil, "(animate -> animal)[0]")
assertQuery(t, m, 0, 0, nil, "(animal -> animal)[0]")
assertQuery(t, m, 0, 0, nil, "(animal -> animate)[0]")
},
},
{
@ -154,7 +154,7 @@ sh*.an* -> sh*.an*`)
assertQuery(t, m, 3, 2, nil, "")
assertQuery(t, m, 2, 2, nil, "shared")
assertQuery(t, m, 0, 0, nil, "shared.(animate -> animal)[0]")
assertQuery(t, m, 0, 0, nil, "shared.(animal -> animal)[0]")
assertQuery(t, m, 0, 0, nil, "shared.(animal -> animate)[0]")
},
},
{
@ -285,6 +285,31 @@ d
assertQuery(t, m, 0, 0, nil, "(* -> *)[*]")
},
},
{
name: "single-glob/defaults",
run: func(t testing.TB) {
m, err := compile(t, `wrapper.*: {
shape: page
}
wrapper.a
wrapper.b
wrapper.c
wrapper.d
scenarios.x: { wrapper.p }
layers.x: { wrapper.p }
`)
assert.Success(t, err)
assertQuery(t, m, 26, 0, nil, "")
assertQuery(t, m, 0, 0, "page", "wrapper.a.shape")
assertQuery(t, m, 0, 0, "page", "wrapper.b.shape")
assertQuery(t, m, 0, 0, "page", "wrapper.c.shape")
assertQuery(t, m, 0, 0, "page", "wrapper.d.shape")
assertQuery(t, m, 0, 0, "page", "scenarios.x.wrapper.p.shape")
assertQuery(t, m, 0, 0, nil, "layers.x.wrapper.p")
},
},
{
name: "double-glob/edge/1",
run: func(t testing.TB) {
@ -314,21 +339,438 @@ task.** -> fast
assertQuery(t, m, 3, 1, nil, "")
},
},
{
name: "double-glob/defaults",
run: func(t testing.TB) {
m, err := compile(t, `**: {
shape: page
}
a
b
c
d
scenarios.x: { p }
layers.x: { p }
`)
assert.Success(t, err)
assertQuery(t, m, 23, 0, nil, "")
assertQuery(t, m, 0, 0, "page", "a.shape")
assertQuery(t, m, 0, 0, "page", "b.shape")
assertQuery(t, m, 0, 0, "page", "c.shape")
assertQuery(t, m, 0, 0, "page", "d.shape")
assertQuery(t, m, 0, 0, "page", "scenarios.x.p.shape")
assertQuery(t, m, 0, 0, nil, "layers.x.p")
},
},
{
name: "triple-glob/defaults",
run: func(t testing.TB) {
m, err := compile(t, `***: {
shape: page
}
a
b
c
d
scenarios.x: { p }
layers.x: { p }
`)
assert.Success(t, err)
assertQuery(t, m, 24, 0, nil, "")
assertQuery(t, m, 0, 0, "page", "a.shape")
assertQuery(t, m, 0, 0, "page", "b.shape")
assertQuery(t, m, 0, 0, "page", "c.shape")
assertQuery(t, m, 0, 0, "page", "d.shape")
assertQuery(t, m, 0, 0, "page", "scenarios.x.p.shape")
assertQuery(t, m, 0, 0, "page", "layers.x.p.shape")
},
},
{
name: "triple-glob/edge-defaults",
run: func(t testing.TB) {
m, err := compile(t, `(*** -> ***)[*]: {
target-arrowhead.shape: diamond
}
a -> b
c -> d
scenarios.x: { p -> q }
layers.x: { j -> f }
`)
assert.Success(t, err)
assertQuery(t, m, 28, 6, nil, "")
assertQuery(t, m, 0, 0, "diamond", "(a -> b)[0].target-arrowhead.shape")
assertQuery(t, m, 0, 0, "diamond", "(c -> d)[0].target-arrowhead.shape")
assertQuery(t, m, 0, 0, "diamond", "scenarios.x.(a -> b)[0].target-arrowhead.shape")
assertQuery(t, m, 0, 0, "diamond", "scenarios.x.(c -> d)[0].target-arrowhead.shape")
assertQuery(t, m, 0, 0, "diamond", "scenarios.x.(p -> q)[0].target-arrowhead.shape")
assertQuery(t, m, 4, 1, nil, "layers.x")
assertQuery(t, m, 0, 0, "diamond", "layers.x.(j -> f)[0].target-arrowhead.shape")
},
},
{
name: "alixander-review/1",
run: func(t testing.TB) {
m, err := compile(t, `
***.style.fill: yellow
**.shape: circle
*.style.multiple: true
x: {
y
}
layers: {
next: {
a
}
}
`)
assert.Success(t, err)
assertQuery(t, m, 14, 0, nil, "")
},
},
{
name: "alixander-review/2",
run: func(t testing.TB) {
m, err := compile(t, `
a
* -> y
b
c
`)
assert.Success(t, err)
assertQuery(t, m, 4, 3, nil, "")
},
},
{
name: "alixander-review/3",
run: func(t testing.TB) {
m, err := compile(t, `
a
***.b -> c
layers: {
z: {
d
}
}
`)
assert.Success(t, err)
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, "")
},
},
{
name: "alixander-review/5",
run: func(t testing.TB) {
m, err := compile(t, `
**.style.fill: red
scenarios: {
b: {
a -> b
}
}
`)
assert.Success(t, err)
assertQuery(t, m, 8, 1, nil, "")
assertQuery(t, m, 0, 0, "red", "scenarios.b.a.style.fill")
assertQuery(t, m, 0, 0, "red", "scenarios.b.b.style.fill")
},
},
{
name: "alixander-review/6",
run: func(t testing.TB) {
m, err := compile(t, `
(* -> *)[*].style.opacity: 0.1
x -> y: hi
x -> y
`)
assert.Success(t, err)
assertQuery(t, m, 6, 2, nil, "")
assertQuery(t, m, 0, 0, 0.1, "(x -> y)[0].style.opacity")
assertQuery(t, m, 0, 0, 0.1, "(x -> y)[1].style.opacity")
},
},
{
name: "alixander-review/7",
run: func(t testing.TB) {
m, err := compile(t, `
*: {
style.fill: red
}
**: {
style.fill: red
}
table: {
style.fill: blue
shape: sql_table
a: b
}
`)
assert.Success(t, err)
assertQuery(t, m, 7, 0, nil, "")
assertQuery(t, m, 0, 0, "blue", "table.style.fill")
},
},
{
name: "alixander-review/8",
run: func(t testing.TB) {
m, err := compile(t, `
(a -> *)[*].style.stroke: red
(* -> *)[*].style.stroke: red
b -> c
`)
assert.Success(t, err)
assertQuery(t, m, 4, 1, nil, "")
assertQuery(t, m, 0, 0, "red", "(b -> c)[0].style.stroke")
},
},
{
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")
},
},
{
name: "override/3",
run: func(t testing.TB) {
m, err := compile(t, `
(*** -> ***)[*].label: hi
a -> b
layers: {
hi: {
(*** -> ***)[*].label: bye
scenarios: {
b: {
# This label is "hi", but it should be "bye"
a -> b
}
}
}
}
`)
assert.Success(t, err)
assertQuery(t, m, 10, 2, nil, "")
assertQuery(t, m, 0, 0, "hi", "(a -> b)[0].label")
assertQuery(t, m, 0, 0, "bye", "layers.hi.scenarios.b.(a -> b)[0].label")
},
},
{
name: "override/4",
run: func(t testing.TB) {
m, err := compile(t, `
(*** -> ***)[*].label: hi
a -> b: {
label: bye
}
`)
assert.Success(t, err)
assertQuery(t, m, 3, 1, nil, "")
assertQuery(t, m, 0, 0, "bye", "(a -> b)[0].label")
},
},
{
name: "override/5",
run: func(t testing.TB) {
m, err := compile(t, `
(*** -> ***)[*].label: hi
# This is "hey" right now but should be "hi"?
a -> b
(*** -> ***)[*].label: hey
`)
assert.Success(t, err)
assertQuery(t, m, 3, 1, nil, "")
assertQuery(t, m, 0, 0, "hey", "(a -> b)[0].label")
},
},
{
name: "override/6",
run: func(t testing.TB) {
m, err := compile(t, `
# Nulling glob doesn't work
a
*a.icon: https://icons.terrastruct.com/essentials%2F073-add.svg
a.icon: null
# Regular icon nulling works
b.icon: https://icons.terrastruct.com/essentials%2F073-add.svg
b.icon: null
# Shape nulling works
*.shape: circle
a.shape: null
b.shape: null
`)
assert.Success(t, err)
assertQuery(t, m, 2, 0, nil, "")
assertQuery(t, m, 0, 0, nil, "a")
assertQuery(t, m, 0, 0, nil, "b")
},
},
{
name: "override/7",
run: func(t testing.TB) {
m, err := compile(t, `
# Nulling glob doesn't work
*a.icon: https://icons.terrastruct.com/essentials%2F073-add.svg
a.icon: null
# Regular icon nulling works
b.icon: https://icons.terrastruct.com/essentials%2F073-add.svg
b.icon: null
# Shape nulling works
*.shape: circle
a.shape: null
b.shape: null
`)
assert.Success(t, err)
assertQuery(t, m, 2, 0, nil, "")
assertQuery(t, m, 0, 0, nil, "a")
assertQuery(t, m, 0, 0, nil, "b")
},
},
{
name: "table-class-exception",
run: func(t testing.TB) {
m, err := compile(t, `
***: {
c: d
}
***: {
style.fill: red
}
table: {
shape: sql_table
a: b
}
class: {
shape: class
a: b
}
`)
assert.Success(t, err)
assertQuery(t, m, 13, 0, nil, "")
},
},
{
name: "prevent-chain-recursion",
run: func(t testing.TB) {
m, err := compile(t, `
***: {
c: d
}
***: {
style.fill: red
}
one
two
`)
assert.Success(t, err)
assertQuery(t, m, 12, 0, nil, "")
},
},
{
name: "import-glob/1",
run: func(t testing.TB) {
m, err := compileFS(t, "index.d2", map[string]string{
"index.d2": "before; ...@globs.d2; after",
"globs.d2": `*: jingle
**: true
***: meow`,
})
assert.Success(t, err)
assertQuery(t, m, 2, 0, nil, "")
assertQuery(t, m, 0, 0, "meow", "before")
assertQuery(t, m, 0, 0, "meow", "after")
},
},
{
name: "import-glob/2",
run: func(t testing.TB) {
m, err := compileFS(t, "index.d2", map[string]string{
"index.d2": `...@rules.d2
hi
`,
"rules.d2": `***.style.fill: red
***: meow
x`,
})
assert.Success(t, err)
assertQuery(t, m, 6, 0, nil, "")
assertQuery(t, m, 2, 0, "meow", "hi")
assertQuery(t, m, 2, 0, "meow", "x")
assertQuery(t, m, 0, 0, "red", "hi.style.fill")
assertQuery(t, m, 0, 0, "red", "x.style.fill")
},
},
}
runa(t, tca)
t.Run("errors", func(t *testing.T) {
tca := []testCase{
{
name: "glob-edge-glob-index",
run: func(t testing.TB) {
_, err := compile(t, `(* -> b)[*].style.fill: red
`)
assert.ErrorString(t, err, `TestCompile/patterns/errors/glob-edge-glob-index.d2:1:2: indexed edge does not exist`)
},
},
}
runa(t, tca)
})
}

View file

@ -14,17 +14,22 @@ func (m *Map) QueryAll(idStr string) (na []Node, _ error) {
}
if k.Key != nil {
f := m.GetField(k.Key.IDA()...)
if f == nil {
fa, err := m.EnsureField(k.Key, nil, false, nil)
if err != nil {
return nil, err
}
if len(fa) == 0 {
return nil, nil
}
if len(k.Edges) == 0 {
na = append(na, f)
return na, nil
}
m = f.Map()
if m == nil {
return nil, nil
for _, f := range fa {
if len(k.Edges) == 0 {
na = append(na, f)
return na, nil
}
m = f.Map()
if m == nil {
return nil, nil
}
}
}
@ -36,7 +41,7 @@ func (m *Map) QueryAll(idStr string) (na []Node, _ error) {
ScopeMap: m,
Edge: k.Edges[i],
}
ea := m.GetEdges(eid, refctx)
ea := m.GetEdges(eid, refctx, nil)
for _, e := range ea {
if k.EdgeKey == nil {
na = append(na, e)

View file

@ -493,7 +493,7 @@ func _set(g *d2graph.Graph, baseAST *d2ast.Map, key string, tag, value *string)
noVal2 := &tmp2
noVal1.Value = d2ast.ValueBox{}
noVal2.Value = d2ast.ValueBox{}
if noVal1.Equals(noVal2) {
if noVal1.D2OracleEquals(noVal2) {
ref.MapKey.Value = mk.Value
return nil
}
@ -776,7 +776,7 @@ func _set(g *d2graph.Graph, baseAST *d2ast.Map, key string, tag, value *string)
func appendUniqueMapKey(m *d2ast.Map, mk *d2ast.Key) {
for _, n := range m.Nodes {
if n.MapKey != nil && n.MapKey.Equals(mk) {
if n.MapKey != nil && n.MapKey.D2OracleEquals(mk) {
return
}
}
@ -1471,7 +1471,7 @@ func ensureNode(g *d2graph.Graph, excludedEdges []*d2ast.Edge, scopeObj *d2graph
}
for _, n := range scope.Nodes {
if n.MapKey != nil && n.MapKey.Equals(mk) {
if n.MapKey != nil && n.MapKey.D2OracleEquals(mk) {
return
}
}
@ -1922,7 +1922,7 @@ func move(g *d2graph.Graph, boardPath []string, key, newKey string, includeDesce
ref.Key.Path = ref.Key.Path[ref.KeyPathIndex:]
exists := false
for _, n := range toScope.Nodes {
if n.MapKey != nil && n.MapKey != ref.MapKey && n.MapKey.Equals(ref.MapKey) {
if n.MapKey != nil && n.MapKey != ref.MapKey && n.MapKey.D2OracleEquals(ref.MapKey) {
exists = true
}
}

View file

@ -9,8 +9,8 @@ fi
PATH="$(cd -- "$(dirname "$0")" && pwd)/ci/sub/bin:$PATH"
cd -- "$(dirname "$0")"
if ! go version | grep -qF '1.20'; then
echoerr "You need go 1.20 to build d2."
if ! go version | grep -q '1.2[0-9]'; then
echoerr "You need go 1.2x to build d2."
exit 1
fi

View file

@ -0,0 +1,610 @@
{
"graph": {
"name": "",
"isFolderOnly": false,
"ast": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,0:0:0-14:0:109",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,1:0:1-1:22:23",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,1:0:1-1:14:15",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,1:0:1-1:3:4",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,1:4:5-1:9:10",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,1:10:11-1:14:15",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,1:16:17-1:22:23",
"value": [
{
"string": "yellow",
"raw_string": "yellow"
}
]
}
}
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,2:0:24-2:16:40",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,2:0:24-2:8:32",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,2:0:24-2:2:26",
"value": [
{
"string": "**",
"raw_string": "**"
}
],
"pattern": [
"*",
"",
"*"
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,2:3:27-2:8:32",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,2:10:34-2:16:40",
"value": [
{
"string": "circle",
"raw_string": "circle"
}
]
}
}
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,3:0:41-3:22:63",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,3:0:41-3:16:57",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,3:0:41-3:1:42",
"value": [
{
"string": "*",
"raw_string": "*"
}
],
"pattern": [
"*"
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,3:2:43-3:7:48",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,3:8:49-3:16:57",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
}
}
]
},
"primary": {},
"value": {
"boolean": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,3:18:59-3:22:63",
"value": true
}
}
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,5:0:65-7:1:75",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,5:0:65-5:1:66",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,5:0:65-5:1:66",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,5:3:68-7:1:75",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,6:2:72-6:3:73",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,6:2:72-6:3:73",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,6:2:72-6:3:73",
"value": [
{
"string": "y",
"raw_string": "y"
}
]
}
}
]
},
"primary": {},
"value": {}
}
}
]
}
}
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,9:0:77-13:1:108",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,9:0:77-9:6:83",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,9:0:77-9:6:83",
"value": [
{
"string": "layers",
"raw_string": "layers"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,9:8:85-13:1:108",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,10:2:89-12:3:106",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,10:2:89-10:6:93",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,10:2:89-10:6:93",
"value": [
{
"string": "next",
"raw_string": "next"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,10:8:95-12:3:106",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,11:4:101-11:5:102",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,11:4:101-11:5:102",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,11:4:101-11:5:102",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"primary": {},
"value": {}
}
}
]
}
}
}
}
]
}
}
}
}
]
},
"root": {
"id": "",
"id_val": "",
"attributes": {
"label": {
"value": ""
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {},
"near_key": null,
"shape": {
"value": ""
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
},
"edges": null,
"objects": [
{
"id": "x",
"id_val": "x",
"references": [
{
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,5:0:65-5:1:66",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,5:0:65-5:1:66",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
}
]
},
"key_path_index": 0,
"map_key_edge_index": -1
}
],
"attributes": {
"label": {
"value": "x"
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {
"fill": {
"value": "yellow"
},
"multiple": {
"value": "true"
}
},
"near_key": null,
"shape": {
"value": "circle"
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
},
{
"id": "y",
"id_val": "y",
"references": [
{
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,6:2:72-6:3:73",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,6:2:72-6:3:73",
"value": [
{
"string": "y",
"raw_string": "y"
}
]
}
}
]
},
"key_path_index": 0,
"map_key_edge_index": -1
}
],
"attributes": {
"label": {
"value": "y"
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {
"fill": {
"value": "yellow"
}
},
"near_key": null,
"shape": {
"value": "circle"
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
}
],
"layers": [
{
"name": "next",
"isFolderOnly": false,
"ast": {
"range": ",1:0:0-2:0:0",
"nodes": [
{
"map_key": {
"range": ",0:0:0-0:0:0",
"key": {
"range": ",0:0:0-0:0:0",
"path": [
{
"unquoted_string": {
"range": ",0:0:0-0:0:0",
"value": [
{
"string": "a"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": ",1:0:0-2:0:0",
"nodes": [
{
"map_key": {
"range": ",0:0:0-0:0:0",
"key": {
"range": ",0:0:0-0:0:0",
"path": [
{
"unquoted_string": {
"range": ",0:0:0-0:0:0",
"value": [
{
"string": "style"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": ",1:0:0-2:0:0",
"nodes": [
{
"map_key": {
"range": ",0:0:0-0:0:0",
"key": {
"range": ",0:0:0-0:0:0",
"path": [
{
"unquoted_string": {
"range": ",0:0:0-0:0:0",
"value": [
{
"string": "fill"
}
]
}
}
]
},
"primary": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,1:16:17-1:22:23",
"value": [
{
"string": "yellow",
"raw_string": "yellow"
}
]
}
},
"value": {}
}
}
]
}
}
}
}
]
}
}
}
}
]
},
"root": {
"id": "",
"id_val": "",
"attributes": {
"label": {
"value": ""
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {},
"near_key": null,
"shape": {
"value": ""
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
},
"edges": null,
"objects": [
{
"id": "a",
"id_val": "a",
"references": [
{
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,11:4:101-11:5:102",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review.d2,11:4:101-11:5:102",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"key_path_index": 0,
"map_key_edge_index": -1
}
],
"attributes": {
"label": {
"value": "a"
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {
"fill": {
"value": "yellow"
}
},
"near_key": null,
"shape": {
"value": "rectangle"
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
}
]
}
]
},
"err": null
}

View file

@ -0,0 +1,610 @@
{
"graph": {
"name": "",
"isFolderOnly": false,
"ast": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,0:0:0-14:0:109",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,1:0:1-1:22:23",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,1:0:1-1:14:15",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,1:0:1-1:3:4",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,1:4:5-1:9:10",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,1:10:11-1:14:15",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,1:16:17-1:22:23",
"value": [
{
"string": "yellow",
"raw_string": "yellow"
}
]
}
}
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,2:0:24-2:16:40",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,2:0:24-2:8:32",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,2:0:24-2:2:26",
"value": [
{
"string": "**",
"raw_string": "**"
}
],
"pattern": [
"*",
"",
"*"
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,2:3:27-2:8:32",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,2:10:34-2:16:40",
"value": [
{
"string": "circle",
"raw_string": "circle"
}
]
}
}
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,3:0:41-3:22:63",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,3:0:41-3:16:57",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,3:0:41-3:1:42",
"value": [
{
"string": "*",
"raw_string": "*"
}
],
"pattern": [
"*"
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,3:2:43-3:7:48",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,3:8:49-3:16:57",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
}
}
]
},
"primary": {},
"value": {
"boolean": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,3:18:59-3:22:63",
"value": true
}
}
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,5:0:65-7:1:75",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,5:0:65-5:1:66",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,5:0:65-5:1:66",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,5:3:68-7:1:75",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,6:2:72-6:3:73",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,6:2:72-6:3:73",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,6:2:72-6:3:73",
"value": [
{
"string": "y",
"raw_string": "y"
}
]
}
}
]
},
"primary": {},
"value": {}
}
}
]
}
}
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,9:0:77-13:1:108",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,9:0:77-9:6:83",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,9:0:77-9:6:83",
"value": [
{
"string": "layers",
"raw_string": "layers"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,9:8:85-13:1:108",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,10:2:89-12:3:106",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,10:2:89-10:6:93",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,10:2:89-10:6:93",
"value": [
{
"string": "next",
"raw_string": "next"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,10:8:95-12:3:106",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,11:4:101-11:5:102",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,11:4:101-11:5:102",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,11:4:101-11:5:102",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"primary": {},
"value": {}
}
}
]
}
}
}
}
]
}
}
}
}
]
},
"root": {
"id": "",
"id_val": "",
"attributes": {
"label": {
"value": ""
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {},
"near_key": null,
"shape": {
"value": ""
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
},
"edges": null,
"objects": [
{
"id": "x",
"id_val": "x",
"references": [
{
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,5:0:65-5:1:66",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,5:0:65-5:1:66",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
}
]
},
"key_path_index": 0,
"map_key_edge_index": -1
}
],
"attributes": {
"label": {
"value": "x"
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {
"fill": {
"value": "yellow"
},
"multiple": {
"value": "true"
}
},
"near_key": null,
"shape": {
"value": "circle"
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
},
{
"id": "y",
"id_val": "y",
"references": [
{
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,6:2:72-6:3:73",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,6:2:72-6:3:73",
"value": [
{
"string": "y",
"raw_string": "y"
}
]
}
}
]
},
"key_path_index": 0,
"map_key_edge_index": -1
}
],
"attributes": {
"label": {
"value": "y"
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {
"fill": {
"value": "yellow"
}
},
"near_key": null,
"shape": {
"value": "circle"
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
}
],
"layers": [
{
"name": "next",
"isFolderOnly": false,
"ast": {
"range": ",1:0:0-2:0:0",
"nodes": [
{
"map_key": {
"range": ",0:0:0-0:0:0",
"key": {
"range": ",0:0:0-0:0:0",
"path": [
{
"unquoted_string": {
"range": ",0:0:0-0:0:0",
"value": [
{
"string": "a"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": ",1:0:0-2:0:0",
"nodes": [
{
"map_key": {
"range": ",0:0:0-0:0:0",
"key": {
"range": ",0:0:0-0:0:0",
"path": [
{
"unquoted_string": {
"range": ",0:0:0-0:0:0",
"value": [
{
"string": "style"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": ",1:0:0-2:0:0",
"nodes": [
{
"map_key": {
"range": ",0:0:0-0:0:0",
"key": {
"range": ",0:0:0-0:0:0",
"path": [
{
"unquoted_string": {
"range": ",0:0:0-0:0:0",
"value": [
{
"string": "fill"
}
]
}
}
]
},
"primary": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,1:16:17-1:22:23",
"value": [
{
"string": "yellow",
"raw_string": "yellow"
}
]
}
},
"value": {}
}
}
]
}
}
}
}
]
}
}
}
}
]
},
"root": {
"id": "",
"id_val": "",
"attributes": {
"label": {
"value": ""
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {},
"near_key": null,
"shape": {
"value": ""
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
},
"edges": null,
"objects": [
{
"id": "a",
"id_val": "a",
"references": [
{
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,11:4:101-11:5:102",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,11:4:101-11:5:102",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"key_path_index": 0,
"map_key_edge_index": -1
}
],
"attributes": {
"label": {
"value": "a"
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {
"fill": {
"value": "yellow"
}
},
"near_key": null,
"shape": {
"value": "rectangle"
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
}
]
}
]
},
"err": null
}

View file

@ -0,0 +1,587 @@
{
"graph": {
"name": "",
"isFolderOnly": true,
"ast": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,0:0:0-8:0:61",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,1:0:1-1:21:22",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,1:0:1-1:13:14",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,1:0:1-1:2:3",
"value": [
{
"string": "**",
"raw_string": "**"
}
],
"pattern": [
"*",
"",
"*"
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,1:3:4-1:8:9",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,1:9:10-1:13:14",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,1:15:16-1:21:22",
"value": [
{
"string": "yellow",
"raw_string": "yellow"
}
]
}
}
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,3:0:24-7:1:60",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,3:0:24-3:9:33",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,3:0:24-3:9:33",
"value": [
{
"string": "scenarios",
"raw_string": "scenarios"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,3:11:35-7:1:60",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,4:2:39-6:3:58",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,4:2:39-4:3:40",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,4:2:39-4:3:40",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,4:5:42-6:3:58",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,5:4:48-5:10:54",
"edges": [
{
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,5:4:48-5:10:54",
"src": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,5:4:48-5:5:49",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,5:4:48-5:5:49",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,5:9:53-5:10:54",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,5:9:53-5:10:54",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"dst_arrow": ">"
}
],
"primary": {},
"value": {}
}
}
]
}
}
}
}
]
}
}
}
}
]
},
"root": {
"id": "",
"id_val": "",
"attributes": {
"label": {
"value": ""
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {},
"near_key": null,
"shape": {
"value": ""
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
},
"edges": null,
"objects": null,
"scenarios": [
{
"name": "b",
"isFolderOnly": false,
"ast": {
"range": ",1:0:0-2:0:0",
"nodes": [
{
"map_key": {
"range": ",0:0:0-0:0:0",
"key": {
"range": ",0:0:0-0:0:0",
"path": [
{
"unquoted_string": {
"range": ",0:0:0-0:0:0",
"value": [
{
"string": "a"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": ",1:0:0-2:0:0",
"nodes": [
{
"map_key": {
"range": ",0:0:0-0:0:0",
"key": {
"range": ",0:0:0-0:0:0",
"path": [
{
"unquoted_string": {
"range": ",0:0:0-0:0:0",
"value": [
{
"string": "style"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": ",1:0:0-2:0:0",
"nodes": [
{
"map_key": {
"range": ",0:0:0-0:0:0",
"key": {
"range": ",0:0:0-0:0:0",
"path": [
{
"unquoted_string": {
"range": ",0:0:0-0:0:0",
"value": [
{
"string": "fill"
}
]
}
}
]
},
"primary": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,1:15:16-1:21:22",
"value": [
{
"string": "yellow",
"raw_string": "yellow"
}
]
}
},
"value": {}
}
}
]
}
}
}
}
]
}
}
}
},
{
"map_key": {
"range": ",0:0:0-0:0:0",
"key": {
"range": ",0:0:0-0:0:0",
"path": [
{
"unquoted_string": {
"range": ",0:0:0-0:0:0",
"value": [
{
"string": "b"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": ",1:0:0-2:0:0",
"nodes": [
{
"map_key": {
"range": ",0:0:0-0:0:0",
"key": {
"range": ",0:0:0-0:0:0",
"path": [
{
"unquoted_string": {
"range": ",0:0:0-0:0:0",
"value": [
{
"string": "style"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": ",1:0:0-2:0:0",
"nodes": [
{
"map_key": {
"range": ",0:0:0-0:0:0",
"key": {
"range": ",0:0:0-0:0:0",
"path": [
{
"unquoted_string": {
"range": ",0:0:0-0:0:0",
"value": [
{
"string": "fill"
}
]
}
}
]
},
"primary": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,1:15:16-1:21:22",
"value": [
{
"string": "yellow",
"raw_string": "yellow"
}
]
}
},
"value": {}
}
}
]
}
}
}
}
]
}
}
}
},
{
"map_key": {
"range": ",0:0:0-0:0:0",
"edges": [
{
"range": ",0:0:0-0:0:0",
"src": {
"range": ",0:0:0-0:0:0",
"path": [
{
"unquoted_string": {
"range": ",0:0:0-0:0:0",
"value": [
{
"string": "a"
}
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": ",0:0:0-0:0:0",
"path": [
{
"unquoted_string": {
"range": ",0:0:0-0:0:0",
"value": [
{
"string": "b"
}
]
}
}
]
},
"dst_arrow": ">"
}
],
"primary": {},
"value": {}
}
}
]
},
"root": {
"id": "",
"id_val": "",
"attributes": {
"label": {
"value": ""
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {},
"near_key": null,
"shape": {
"value": ""
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
},
"edges": [
{
"index": 0,
"isCurve": false,
"src_arrow": false,
"dst_arrow": true,
"references": [
{
"map_key_edge_index": 0
}
],
"attributes": {
"label": {
"value": ""
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {},
"near_key": null,
"shape": {
"value": ""
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
}
],
"objects": [
{
"id": "a",
"id_val": "a",
"references": [
{
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,5:4:48-5:5:49",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,5:4:48-5:5:49",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"key_path_index": 0,
"map_key_edge_index": 0
}
],
"attributes": {
"label": {
"value": "a"
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {
"fill": {
"value": "yellow"
}
},
"near_key": null,
"shape": {
"value": "rectangle"
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
},
{
"id": "b",
"id_val": "b",
"references": [
{
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,5:9:53-5:10:54",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,5:9:53-5:10:54",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"key_path_index": 0,
"map_key_edge_index": 0
}
],
"attributes": {
"label": {
"value": "b"
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {
"fill": {
"value": "yellow"
}
},
"near_key": null,
"shape": {
"value": "rectangle"
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
}
]
}
]
},
"err": null
}

View file

@ -0,0 +1,486 @@
{
"graph": {
"name": "",
"isFolderOnly": false,
"ast": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,0:0:0-18:0:117",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,1:0:1-3:1:16",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,1:0:1-1:3:4",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,1:0:1-1:3:4",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,1:5:6-3:1:16",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,2:2:10-2:6:14",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,2:2:10-2:3:11",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,2:2:10-2:3:11",
"value": [
{
"string": "c",
"raw_string": "c"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,2:5:13-2:6:14",
"value": [
{
"string": "d",
"raw_string": "d"
}
]
}
}
}
}
]
}
}
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,5:0:18-7:1:44",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,5:0:18-5:3:21",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,5:0:18-5:3:21",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,5:5:23-7:1:44",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,6:2:27-6:17:42",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,6:2:27-6:12:37",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,6:2:27-6:7:32",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,6:8:33-6:12:37",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,6:14:39-6:17:42",
"value": [
{
"string": "red",
"raw_string": "red"
}
]
}
}
}
}
]
}
}
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,9:0:46-12:1:82",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,9:0:46-9:5:51",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,9:0:46-9:5:51",
"value": [
{
"string": "table",
"raw_string": "table"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,9:7:53-12:1:82",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,10:2:57-10:18:73",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,10:2:57-10:7:62",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,10:2:57-10:7:62",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,10:9:64-10:18:73",
"value": [
{
"string": "sql_table",
"raw_string": "sql_table"
}
]
}
}
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,11:2:76-11:6:80",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,11:2:76-11:3:77",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,11:2:76-11:3:77",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,11:5:79-11:6:80",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
}
}
]
}
}
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,14:0:84-17:1:116",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,14:0:84-14:5:89",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,14:0:84-14:5:89",
"value": [
{
"string": "class",
"raw_string": "class"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,14:7:91-17:1:116",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,15:2:95-15:14:107",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,15:2:95-15:7:100",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,15:2:95-15:7:100",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,15:9:102-15:14:107",
"value": [
{
"string": "class",
"raw_string": "class"
}
]
}
}
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,16:2:110-16:6:114",
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,16:2:110-16:3:111",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,16:2:110-16:3:111",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,16:5:113-16:6:114",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
}
}
]
}
}
}
}
]
},
"root": {
"id": "",
"id_val": "",
"attributes": {
"label": {
"value": ""
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {},
"near_key": null,
"shape": {
"value": ""
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
},
"edges": null,
"objects": [
{
"id": "table",
"id_val": "table",
"references": [
{
"key": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,9:0:46-9:5:51",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/3.d2,9:0:46-9:5:51",
"value": [
{
"string": "table",
"raw_string": "table"
}
]
}
}
]
},
"key_path_index": 0,
"map_key_edge_index": -1
}
],
"sql_table": {
"columns": [
{
"name": {
"label": "c",
"fontSize": 0,
"fontFamily": "",
"language": "",
"color": "",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 0,
"labelHeight": 0
},
"type": {
"label": "d",
"fontSize": 0,
"fontFamily": "",
"language": "",
"color": "",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 0,
"labelHeight": 0
},
"constraint": null,
"reference": ""
},
{
"name": {
"label": "a",
"fontSize": 0,
"fontFamily": "",
"language": "",
"color": "",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 0,
"labelHeight": 0
},
"type": {
"label": "b",
"fontSize": 0,
"fontFamily": "",
"language": "",
"color": "",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 0,
"labelHeight": 0
},
"constraint": null,
"reference": ""
}
]
},
"attributes": {
"label": {
"value": "table"
},
"labelDimensions": {
"width": 0,
"height": 0
},
"style": {
"fill": {
"value": "red"
}
},
"near_key": null,
"shape": {
"value": "sql_table"
},
"direction": {
"value": ""
},
"constraint": null
},
"zIndex": 0
}
]
},
"err": null
}

View file

@ -52,7 +52,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -163,7 +165,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -252,7 +256,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -359,7 +365,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -495,7 +503,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -107,7 +107,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -196,7 +198,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -303,7 +307,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -439,7 +445,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -558,7 +566,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -647,7 +657,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -754,7 +766,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -890,7 +904,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -1009,7 +1025,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1098,7 +1116,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1205,7 +1225,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -1312,7 +1334,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1401,7 +1425,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1508,7 +1534,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1644,7 +1672,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -1774,7 +1804,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -1830,7 +1862,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -2018,7 +2052,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -2133,7 +2169,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -2222,7 +2260,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -2329,7 +2369,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -2436,7 +2478,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -2525,7 +2569,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -2632,7 +2678,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -2768,7 +2816,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -2898,7 +2948,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -2954,7 +3006,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -3010,7 +3064,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -3096,7 +3152,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -3211,7 +3269,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -3300,7 +3360,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -3407,7 +3469,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -3514,7 +3578,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -3597,7 +3663,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -3686,7 +3754,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -3769,7 +3839,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -3876,7 +3948,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -3977,7 +4051,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -4113,7 +4189,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -4243,7 +4321,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -4373,7 +4453,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -4429,7 +4511,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -4485,7 +4569,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -4536,7 +4622,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -4724,7 +4812,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -4839,7 +4929,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -4928,7 +5020,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -5035,7 +5129,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -5142,7 +5238,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -5225,7 +5323,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -5314,7 +5414,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -5397,7 +5499,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -5504,7 +5608,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -5605,7 +5711,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -5741,7 +5849,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -5871,7 +5981,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -6001,7 +6113,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -6057,7 +6171,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -6108,7 +6224,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -6164,7 +6282,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -6215,7 +6335,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -6279,7 +6401,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -6390,7 +6514,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -6479,7 +6605,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -6586,7 +6714,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -6693,7 +6823,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -6776,7 +6908,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -6865,7 +6999,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -6948,7 +7084,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -7055,7 +7193,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -7156,7 +7296,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -7292,7 +7434,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -7422,7 +7566,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -7552,7 +7698,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -7638,7 +7786,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -7753,7 +7903,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -7920,7 +8072,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -8476,7 +8630,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -9061,7 +9217,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -9675,7 +9833,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -107,7 +107,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -196,7 +198,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -303,7 +307,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -439,7 +445,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -558,7 +566,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -701,7 +711,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -790,7 +802,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -917,7 +931,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1024,7 +1040,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -1151,7 +1169,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1287,7 +1307,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1416,7 +1438,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1574,7 +1598,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

File diff suppressed because it is too large Load diff

View file

@ -107,7 +107,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -196,7 +198,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -265,7 +269,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -401,7 +407,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -566,7 +574,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -685,7 +695,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -774,7 +786,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -843,7 +857,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -900,7 +916,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1036,7 +1054,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -1122,7 +1142,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1287,7 +1309,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1437,7 +1461,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1616,7 +1642,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -107,7 +107,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -196,7 +198,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -303,7 +307,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -439,7 +445,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -511,7 +519,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -622,7 +632,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -711,7 +723,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -818,7 +832,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -954,7 +970,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1040,7 +1058,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1155,7 +1175,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -1266,7 +1288,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1355,7 +1379,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1462,7 +1488,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1598,7 +1626,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1742,7 +1772,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1915,7 +1947,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -1,617 +0,0 @@
{
"fields": [
{
"name": "x",
"composite": {
"fields": [
{
"name": "classes",
"composite": {
"fields": [
{
"name": "mango",
"composite": {
"fields": [
{
"name": "style",
"composite": {
"fields": [
{
"name": "fill",
"primary": {
"value": {
"range": "TestCompile/classes/nonroot-class.d2,3:18:49-3:24:55",
"value": [
{
"string": "orange",
"raw_string": "orange"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/classes/nonroot-class.d2,3:12:43-3:16:47",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
},
"key_path": {
"range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:16:47",
"path": [
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:11:42",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,3:12:43-3:16:47",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:24:55",
"key": {
"range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:16:47",
"path": [
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:11:42",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,3:12:43-3:16:47",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,3:18:49-3:24:55",
"value": [
{
"string": "orange",
"raw_string": "orange"
}
]
}
}
}
}
}
]
}
],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:11:42",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
},
"key_path": {
"range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:16:47",
"path": [
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:11:42",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,3:12:43-3:16:47",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:24:55",
"key": {
"range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:16:47",
"path": [
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:11:42",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,3:12:43-3:16:47",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,3:18:49-3:24:55",
"value": [
{
"string": "orange",
"raw_string": "orange"
}
]
}
}
}
}
}
]
}
],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/classes/nonroot-class.d2,2:4:22-2:9:27",
"value": [
{
"string": "mango",
"raw_string": "mango"
}
]
},
"key_path": {
"range": "TestCompile/classes/nonroot-class.d2,2:4:22-2:9:27",
"path": [
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,2:4:22-2:9:27",
"value": [
{
"string": "mango",
"raw_string": "mango"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/classes/nonroot-class.d2,2:4:22-4:5:61",
"key": {
"range": "TestCompile/classes/nonroot-class.d2,2:4:22-2:9:27",
"path": [
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,2:4:22-2:9:27",
"value": [
{
"string": "mango",
"raw_string": "mango"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "TestCompile/classes/nonroot-class.d2,2:11:29-4:4:60",
"nodes": [
{
"map_key": {
"range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:24:55",
"key": {
"range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:16:47",
"path": [
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:11:42",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,3:12:43-3:16:47",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,3:18:49-3:24:55",
"value": [
{
"string": "orange",
"raw_string": "orange"
}
]
}
}
}
}
]
}
}
}
}
}
]
}
],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/classes/nonroot-class.d2,1:2:7-1:9:14",
"value": [
{
"string": "classes",
"raw_string": "classes"
}
]
},
"key_path": {
"range": "TestCompile/classes/nonroot-class.d2,1:2:7-1:9:14",
"path": [
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,1:2:7-1:9:14",
"value": [
{
"string": "classes",
"raw_string": "classes"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/classes/nonroot-class.d2,1:2:7-5:3:65",
"key": {
"range": "TestCompile/classes/nonroot-class.d2,1:2:7-1:9:14",
"path": [
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,1:2:7-1:9:14",
"value": [
{
"string": "classes",
"raw_string": "classes"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "TestCompile/classes/nonroot-class.d2,1:11:16-5:2:64",
"nodes": [
{
"map_key": {
"range": "TestCompile/classes/nonroot-class.d2,2:4:22-4:5:61",
"key": {
"range": "TestCompile/classes/nonroot-class.d2,2:4:22-2:9:27",
"path": [
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,2:4:22-2:9:27",
"value": [
{
"string": "mango",
"raw_string": "mango"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "TestCompile/classes/nonroot-class.d2,2:11:29-4:4:60",
"nodes": [
{
"map_key": {
"range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:24:55",
"key": {
"range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:16:47",
"path": [
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:11:42",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,3:12:43-3:16:47",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,3:18:49-3:24:55",
"value": [
{
"string": "orange",
"raw_string": "orange"
}
]
}
}
}
}
]
}
}
}
}
]
}
}
}
}
}
]
}
],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/classes/nonroot-class.d2,0:0:0-0:1:1",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
},
"key_path": {
"range": "TestCompile/classes/nonroot-class.d2,0:0:0-0:1:1",
"path": [
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,0:0:0-0:1:1",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/classes/nonroot-class.d2,0:0:0-6:1:67",
"key": {
"range": "TestCompile/classes/nonroot-class.d2,0:0:0-0:1:1",
"path": [
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,0:0:0-0:1:1",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "TestCompile/classes/nonroot-class.d2,0:3:3-6:0:66",
"nodes": [
{
"map_key": {
"range": "TestCompile/classes/nonroot-class.d2,1:2:7-5:3:65",
"key": {
"range": "TestCompile/classes/nonroot-class.d2,1:2:7-1:9:14",
"path": [
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,1:2:7-1:9:14",
"value": [
{
"string": "classes",
"raw_string": "classes"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "TestCompile/classes/nonroot-class.d2,1:11:16-5:2:64",
"nodes": [
{
"map_key": {
"range": "TestCompile/classes/nonroot-class.d2,2:4:22-4:5:61",
"key": {
"range": "TestCompile/classes/nonroot-class.d2,2:4:22-2:9:27",
"path": [
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,2:4:22-2:9:27",
"value": [
{
"string": "mango",
"raw_string": "mango"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "TestCompile/classes/nonroot-class.d2,2:11:29-4:4:60",
"nodes": [
{
"map_key": {
"range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:24:55",
"key": {
"range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:16:47",
"path": [
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,3:6:37-3:11:42",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,3:12:43-3:16:47",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/classes/nonroot-class.d2,3:18:49-3:24:55",
"value": [
{
"string": "orange",
"raw_string": "orange"
}
]
}
}
}
}
]
}
}
}
}
]
}
}
}
}
]
}
}
}
}
}
]
}
],
"edges": null
}

View file

@ -185,7 +185,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -374,7 +376,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -558,7 +562,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -747,7 +753,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -931,7 +939,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -1120,7 +1130,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1297,7 +1309,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -1472,7 +1486,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -1647,7 +1663,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -170,7 +170,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -341,7 +343,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -515,7 +519,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -686,7 +692,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -835,7 +843,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -111,7 +111,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -226,7 +228,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -329,7 +333,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -137,7 +137,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -257,7 +259,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -405,7 +409,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -531,7 +537,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -118,7 +118,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -73,7 +73,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -99,7 +99,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -188,7 +190,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -71,7 +71,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -189,7 +191,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -307,7 +311,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -67,7 +67,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -163,7 +165,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -52,7 +52,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -110,7 +110,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -172,7 +174,73 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
},
{
"string": {
"range": "TestCompile/filters/array.d2,11:2:135-11:7:140",
"value": [
{
"string": "class",
"raw_string": "class"
}
]
},
"key_path": {
"range": "TestCompile/filters/array.d2,11:2:135-11:7:140",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/array.d2,11:2:135-11:7:140",
"value": [
{
"string": "class",
"raw_string": "class"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/array.d2,11:1:134-11:15:148",
"ampersand": true,
"key": {
"range": "TestCompile/filters/array.d2,11:2:135-11:7:140",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/array.d2,11:2:135-11:7:140",
"value": [
{
"string": "class",
"raw_string": "class"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/array.d2,11:9:142-11:15:148",
"value": [
{
"string": "server",
"raw_string": "server"
}
]
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
},
@ -265,7 +333,9 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -349,7 +419,9 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -463,7 +535,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -577,7 +651,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -639,7 +715,9 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -753,7 +831,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -867,7 +947,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -929,7 +1011,73 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
},
{
"string": {
"range": "TestCompile/filters/array.d2,11:2:135-11:7:140",
"value": [
{
"string": "class",
"raw_string": "class"
}
]
},
"key_path": {
"range": "TestCompile/filters/array.d2,11:2:135-11:7:140",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/array.d2,11:2:135-11:7:140",
"value": [
{
"string": "class",
"raw_string": "class"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/array.d2,11:1:134-11:15:148",
"ampersand": true,
"key": {
"range": "TestCompile/filters/array.d2,11:2:135-11:7:140",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/array.d2,11:2:135-11:7:140",
"value": [
{
"string": "class",
"raw_string": "class"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/array.d2,11:9:142-11:15:148",
"value": [
{
"string": "server",
"raw_string": "server"
}
]
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
},
@ -1022,7 +1170,9 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -1106,7 +1256,9 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -1220,7 +1372,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -1,560 +0,0 @@
{
"fields": [
{
"name": "jacob",
"composite": {
"fields": [
{
"name": "shape",
"primary": {
"value": {
"range": "TestCompile/filters/base#01.d2,1:8:17-1:14:23",
"value": [
{
"string": "circle",
"raw_string": "circle"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/filters/base#01.d2,1:1:10-1:6:15",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
},
"key_path": {
"range": "TestCompile/filters/base#01.d2,1:1:10-1:6:15",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,1:1:10-1:6:15",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/base#01.d2,1:1:10-1:14:23",
"key": {
"range": "TestCompile/filters/base#01.d2,1:1:10-1:6:15",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,1:1:10-1:6:15",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,1:8:17-1:14:23",
"value": [
{
"string": "circle",
"raw_string": "circle"
}
]
}
}
}
}
},
{
"string": {
"range": "TestCompile/filters/base#01.d2,7:2:63-7:7:68",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
},
"key_path": {
"range": "TestCompile/filters/base#01.d2,7:2:63-7:7:68",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,7:2:63-7:7:68",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/base#01.d2,7:1:62-7:18:79",
"ampersand": true,
"key": {
"range": "TestCompile/filters/base#01.d2,7:2:63-7:7:68",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,7:2:63-7:7:68",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,7:9:70-7:18:79",
"value": [
{
"string": "rectangle",
"raw_string": "rectangle"
}
]
}
}
}
}
}
]
}
],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/filters/base#01.d2,0:0:0-0:5:5",
"value": [
{
"string": "jacob",
"raw_string": "jacob"
}
]
},
"key_path": {
"range": "TestCompile/filters/base#01.d2,0:0:0-0:5:5",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,0:0:0-0:5:5",
"value": [
{
"string": "jacob",
"raw_string": "jacob"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/base#01.d2,0:0:0-2:1:25",
"key": {
"range": "TestCompile/filters/base#01.d2,0:0:0-0:5:5",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,0:0:0-0:5:5",
"value": [
{
"string": "jacob",
"raw_string": "jacob"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "TestCompile/filters/base#01.d2,0:7:7-2:1:25",
"nodes": [
{
"map_key": {
"range": "TestCompile/filters/base#01.d2,1:1:10-1:14:23",
"key": {
"range": "TestCompile/filters/base#01.d2,1:1:10-1:6:15",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,1:1:10-1:6:15",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,1:8:17-1:14:23",
"value": [
{
"string": "circle",
"raw_string": "circle"
}
]
}
}
}
}
]
}
}
}
}
}
]
},
{
"name": "jeremy",
"composite": {
"fields": [
{
"name": "shape",
"primary": {
"value": {
"range": "TestCompile/filters/base#01.d2,7:9:70-7:18:79",
"value": [
{
"string": "rectangle",
"raw_string": "rectangle"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/filters/base#01.d2,4:1:37-4:6:42",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
},
"key_path": {
"range": "TestCompile/filters/base#01.d2,4:1:37-4:6:42",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,4:1:37-4:6:42",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/base#01.d2,4:1:37-4:17:53",
"key": {
"range": "TestCompile/filters/base#01.d2,4:1:37-4:6:42",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,4:1:37-4:6:42",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,4:8:44-4:17:53",
"value": [
{
"string": "rectangle",
"raw_string": "rectangle"
}
]
}
}
}
}
},
{
"string": {
"range": "TestCompile/filters/base#01.d2,7:2:63-7:7:68",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
},
"key_path": {
"range": "TestCompile/filters/base#01.d2,7:2:63-7:7:68",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,7:2:63-7:7:68",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/base#01.d2,7:1:62-7:18:79",
"ampersand": true,
"key": {
"range": "TestCompile/filters/base#01.d2,7:2:63-7:7:68",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,7:2:63-7:7:68",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,7:9:70-7:18:79",
"value": [
{
"string": "rectangle",
"raw_string": "rectangle"
}
]
}
}
}
}
}
]
},
{
"name": "label",
"primary": {
"value": {
"range": "TestCompile/filters/base#01.d2,8:8:88-8:23:103",
"value": [
{
"string": "I'm a rectangle",
"raw_string": "I'm a rectangle"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/filters/base#01.d2,8:1:81-8:6:86",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
},
"key_path": {
"range": "TestCompile/filters/base#01.d2,8:1:81-8:6:86",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,8:1:81-8:6:86",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/base#01.d2,8:1:81-8:23:103",
"key": {
"range": "TestCompile/filters/base#01.d2,8:1:81-8:6:86",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,8:1:81-8:6:86",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,8:8:88-8:23:103",
"value": [
{
"string": "I'm a rectangle",
"raw_string": "I'm a rectangle"
}
]
}
}
}
}
}
]
}
],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/filters/base#01.d2,3:0:26-3:6:32",
"value": [
{
"string": "jeremy",
"raw_string": "jeremy"
}
]
},
"key_path": {
"range": "TestCompile/filters/base#01.d2,3:0:26-3:6:32",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,3:0:26-3:6:32",
"value": [
{
"string": "jeremy",
"raw_string": "jeremy"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/base#01.d2,3:0:26-5:1:55",
"key": {
"range": "TestCompile/filters/base#01.d2,3:0:26-3:6:32",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,3:0:26-3:6:32",
"value": [
{
"string": "jeremy",
"raw_string": "jeremy"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "TestCompile/filters/base#01.d2,3:8:34-5:1:55",
"nodes": [
{
"map_key": {
"range": "TestCompile/filters/base#01.d2,4:1:37-4:17:53",
"key": {
"range": "TestCompile/filters/base#01.d2,4:1:37-4:6:42",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,4:1:37-4:6:42",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/base#01.d2,4:8:44-4:17:53",
"value": [
{
"string": "rectangle",
"raw_string": "rectangle"
}
]
}
}
}
}
]
}
}
}
}
}
]
}
],
"edges": null
}

View file

@ -77,7 +77,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -139,7 +141,9 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -235,7 +239,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -316,7 +322,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -378,7 +386,73 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
},
{
"string": {
"range": "TestCompile/filters/base.d2,7:2:63-7:7:68",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
},
"key_path": {
"range": "TestCompile/filters/base.d2,7:2:63-7:7:68",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/base.d2,7:2:63-7:7:68",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/base.d2,7:1:62-7:18:79",
"ampersand": true,
"key": {
"range": "TestCompile/filters/base.d2,7:2:63-7:7:68",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/base.d2,7:2:63-7:7:68",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/base.d2,7:9:70-7:18:79",
"value": [
{
"string": "rectangle",
"raw_string": "rectangle"
}
]
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
},
@ -455,7 +529,9 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -551,7 +627,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

File diff suppressed because it is too large Load diff

View file

@ -1,749 +0,0 @@
{
"fields": [
{
"name": "jacob",
"composite": {
"fields": [
{
"name": "style",
"composite": {
"fields": [
{
"name": "fill",
"primary": {
"value": {
"range": "TestCompile/filters/errors/bad-syntax.d2,1:7:22-1:10:25",
"value": [
{
"string": "red",
"raw_string": "red"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,1:1:16-1:5:20",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
},
"key_path": {
"range": "TestCompile/filters/errors/bad-syntax.d2,1:1:16-1:5:20",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,1:1:16-1:5:20",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,1:1:16-1:10:25",
"key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,1:1:16-1:5:20",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,1:1:16-1:5:20",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,1:7:22-1:10:25",
"value": [
{
"string": "red",
"raw_string": "red"
}
]
}
}
}
}
}
]
},
{
"name": "multiple",
"primary": {
"value": {
"range": "TestCompile/filters/errors/bad-syntax.d2,2:11:37-2:15:41",
"value": true
}
},
"references": [
{
"string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,2:1:27-2:9:35",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
},
"key_path": {
"range": "TestCompile/filters/errors/bad-syntax.d2,2:1:27-2:9:35",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,2:1:27-2:9:35",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,2:1:27-2:15:41",
"key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,2:1:27-2:9:35",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,2:1:27-2:9:35",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
}
}
]
},
"primary": {},
"value": {
"boolean": {
"range": "TestCompile/filters/errors/bad-syntax.d2,2:11:37-2:15:41",
"value": true
}
}
}
}
}
]
}
],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,0:6:6-0:11:11",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
},
"key_path": {
"range": "TestCompile/filters/errors/bad-syntax.d2,0:0:0-0:11:11",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,0:0:0-0:5:5",
"value": [
{
"string": "jacob",
"raw_string": "jacob"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,0:6:6-0:11:11",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,0:0:0-3:1:43",
"key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,0:0:0-0:11:11",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,0:0:0-0:5:5",
"value": [
{
"string": "jacob",
"raw_string": "jacob"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,0:6:6-0:11:11",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "TestCompile/filters/errors/bad-syntax.d2,0:13:13-3:1:43",
"nodes": [
{
"map_key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,1:1:16-1:10:25",
"key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,1:1:16-1:5:20",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,1:1:16-1:5:20",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,1:7:22-1:10:25",
"value": [
{
"string": "red",
"raw_string": "red"
}
]
}
}
}
},
{
"map_key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,2:1:27-2:15:41",
"key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,2:1:27-2:9:35",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,2:1:27-2:9:35",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
}
}
]
},
"primary": {},
"value": {
"boolean": {
"range": "TestCompile/filters/errors/bad-syntax.d2,2:11:37-2:15:41",
"value": true
}
}
}
}
]
}
}
}
}
}
]
},
{
"name": "&style",
"composite": {
"fields": [
{
"name": "fill",
"primary": {
"value": {
"range": "TestCompile/filters/errors/bad-syntax.d2,6:8:65-6:11:68",
"value": [
{
"string": "red",
"raw_string": "red"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,6:2:59-6:6:63",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
},
"key_path": {
"range": "TestCompile/filters/errors/bad-syntax.d2,6:2:59-6:6:63",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,6:2:59-6:6:63",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,6:2:59-6:11:68",
"key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,6:2:59-6:6:63",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,6:2:59-6:6:63",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,6:8:65-6:11:68",
"value": [
{
"string": "red",
"raw_string": "red"
}
]
}
}
}
}
}
]
},
{
"name": "multiple",
"primary": {
"value": {
"range": "TestCompile/filters/errors/bad-syntax.d2,7:12:81-7:16:85",
"value": true
}
},
"references": [
{
"string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,7:2:71-7:10:79",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
},
"key_path": {
"range": "TestCompile/filters/errors/bad-syntax.d2,7:2:71-7:10:79",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,7:2:71-7:10:79",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,7:2:71-7:16:85",
"key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,7:2:71-7:10:79",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,7:2:71-7:10:79",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
}
}
]
},
"primary": {},
"value": {
"boolean": {
"range": "TestCompile/filters/errors/bad-syntax.d2,7:12:81-7:16:85",
"value": true
}
}
}
}
}
]
}
],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,5:2:47-5:8:53",
"value": [
{
"string": "&style",
"raw_string": "&style"
}
]
},
"key_path": {
"range": "TestCompile/filters/errors/bad-syntax.d2,5:0:45-5:8:53",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,5:0:45-5:1:46",
"value": [
{
"string": "*",
"raw_string": "*"
}
],
"pattern": [
"*"
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,5:2:47-5:8:53",
"value": [
{
"string": "&style",
"raw_string": "&style"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,5:0:45-8:1:87",
"key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,5:0:45-5:8:53",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,5:0:45-5:1:46",
"value": [
{
"string": "*",
"raw_string": "*"
}
],
"pattern": [
"*"
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,5:2:47-5:8:53",
"value": [
{
"string": "&style",
"raw_string": "&style"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "TestCompile/filters/errors/bad-syntax.d2,5:10:55-8:1:87",
"nodes": [
{
"map_key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,6:2:59-6:11:68",
"key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,6:2:59-6:6:63",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,6:2:59-6:6:63",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,6:8:65-6:11:68",
"value": [
{
"string": "red",
"raw_string": "red"
}
]
}
}
}
},
{
"map_key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,7:2:71-7:16:85",
"key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,7:2:71-7:10:79",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,7:2:71-7:10:79",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
}
}
]
},
"primary": {},
"value": {
"boolean": {
"range": "TestCompile/filters/errors/bad-syntax.d2,7:12:81-7:16:85",
"value": true
}
}
}
}
]
}
}
}
}
}
]
}
],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,0:0:0-0:5:5",
"value": [
{
"string": "jacob",
"raw_string": "jacob"
}
]
},
"key_path": {
"range": "TestCompile/filters/errors/bad-syntax.d2,0:0:0-0:11:11",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,0:0:0-0:5:5",
"value": [
{
"string": "jacob",
"raw_string": "jacob"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,0:6:6-0:11:11",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,0:0:0-3:1:43",
"key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,0:0:0-0:11:11",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,0:0:0-0:5:5",
"value": [
{
"string": "jacob",
"raw_string": "jacob"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,0:6:6-0:11:11",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "TestCompile/filters/errors/bad-syntax.d2,0:13:13-3:1:43",
"nodes": [
{
"map_key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,1:1:16-1:10:25",
"key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,1:1:16-1:5:20",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,1:1:16-1:5:20",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,1:7:22-1:10:25",
"value": [
{
"string": "red",
"raw_string": "red"
}
]
}
}
}
},
{
"map_key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,2:1:27-2:15:41",
"key": {
"range": "TestCompile/filters/errors/bad-syntax.d2,2:1:27-2:9:35",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/bad-syntax.d2,2:1:27-2:9:35",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
}
}
]
},
"primary": {},
"value": {
"boolean": {
"range": "TestCompile/filters/errors/bad-syntax.d2,2:11:37-2:15:41",
"value": true
}
}
}
}
]
}
}
}
}
}
]
}
],
"edges": null
}

View file

@ -1,449 +0,0 @@
{
"fields": [
{
"name": "jacob",
"composite": {
"fields": [
{
"name": "style",
"composite": {
"fields": [
{
"name": "fill",
"primary": {
"value": {
"range": "TestCompile/filters/errors/composite.d2,8:7:73-8:10:76",
"value": [
{
"string": "red",
"raw_string": "red"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/filters/errors/composite.d2,8:1:67-8:5:71",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
},
"key_path": {
"range": "TestCompile/filters/errors/composite.d2,8:1:67-8:5:71",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/composite.d2,8:1:67-8:5:71",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/errors/composite.d2,8:1:67-8:10:76",
"key": {
"range": "TestCompile/filters/errors/composite.d2,8:1:67-8:5:71",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/composite.d2,8:1:67-8:5:71",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/errors/composite.d2,8:7:73-8:10:76",
"value": [
{
"string": "red",
"raw_string": "red"
}
]
}
}
}
}
}
]
},
{
"name": "multiple",
"primary": {
"value": {
"range": "TestCompile/filters/errors/composite.d2,9:11:88-9:15:92",
"value": true
}
},
"references": [
{
"string": {
"range": "TestCompile/filters/errors/composite.d2,9:1:78-9:9:86",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
},
"key_path": {
"range": "TestCompile/filters/errors/composite.d2,9:1:78-9:9:86",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/composite.d2,9:1:78-9:9:86",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/errors/composite.d2,9:1:78-9:15:92",
"key": {
"range": "TestCompile/filters/errors/composite.d2,9:1:78-9:9:86",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/composite.d2,9:1:78-9:9:86",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
}
}
]
},
"primary": {},
"value": {
"boolean": {
"range": "TestCompile/filters/errors/composite.d2,9:11:88-9:15:92",
"value": true
}
}
}
}
}
]
}
],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/filters/errors/composite.d2,7:6:57-7:11:62",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
},
"key_path": {
"range": "TestCompile/filters/errors/composite.d2,7:0:51-7:11:62",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/composite.d2,7:0:51-7:5:56",
"value": [
{
"string": "jacob",
"raw_string": "jacob"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/errors/composite.d2,7:6:57-7:11:62",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/errors/composite.d2,7:0:51-10:1:94",
"key": {
"range": "TestCompile/filters/errors/composite.d2,7:0:51-7:11:62",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/composite.d2,7:0:51-7:5:56",
"value": [
{
"string": "jacob",
"raw_string": "jacob"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/errors/composite.d2,7:6:57-7:11:62",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "TestCompile/filters/errors/composite.d2,7:13:64-10:1:94",
"nodes": [
{
"map_key": {
"range": "TestCompile/filters/errors/composite.d2,8:1:67-8:10:76",
"key": {
"range": "TestCompile/filters/errors/composite.d2,8:1:67-8:5:71",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/composite.d2,8:1:67-8:5:71",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/errors/composite.d2,8:7:73-8:10:76",
"value": [
{
"string": "red",
"raw_string": "red"
}
]
}
}
}
},
{
"map_key": {
"range": "TestCompile/filters/errors/composite.d2,9:1:78-9:15:92",
"key": {
"range": "TestCompile/filters/errors/composite.d2,9:1:78-9:9:86",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/composite.d2,9:1:78-9:9:86",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
}
}
]
},
"primary": {},
"value": {
"boolean": {
"range": "TestCompile/filters/errors/composite.d2,9:11:88-9:15:92",
"value": true
}
}
}
}
]
}
}
}
}
}
]
}
],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/filters/errors/composite.d2,7:0:51-7:5:56",
"value": [
{
"string": "jacob",
"raw_string": "jacob"
}
]
},
"key_path": {
"range": "TestCompile/filters/errors/composite.d2,7:0:51-7:11:62",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/composite.d2,7:0:51-7:5:56",
"value": [
{
"string": "jacob",
"raw_string": "jacob"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/errors/composite.d2,7:6:57-7:11:62",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/errors/composite.d2,7:0:51-10:1:94",
"key": {
"range": "TestCompile/filters/errors/composite.d2,7:0:51-7:11:62",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/composite.d2,7:0:51-7:5:56",
"value": [
{
"string": "jacob",
"raw_string": "jacob"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/errors/composite.d2,7:6:57-7:11:62",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "TestCompile/filters/errors/composite.d2,7:13:64-10:1:94",
"nodes": [
{
"map_key": {
"range": "TestCompile/filters/errors/composite.d2,8:1:67-8:10:76",
"key": {
"range": "TestCompile/filters/errors/composite.d2,8:1:67-8:5:71",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/composite.d2,8:1:67-8:5:71",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/errors/composite.d2,8:7:73-8:10:76",
"value": [
{
"string": "red",
"raw_string": "red"
}
]
}
}
}
},
{
"map_key": {
"range": "TestCompile/filters/errors/composite.d2,9:1:78-9:15:92",
"key": {
"range": "TestCompile/filters/errors/composite.d2,9:1:78-9:9:86",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/composite.d2,9:1:78-9:9:86",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
}
}
]
},
"primary": {},
"value": {
"boolean": {
"range": "TestCompile/filters/errors/composite.d2,9:11:88-9:15:92",
"value": true
}
}
}
}
]
}
}
}
}
}
]
}
],
"edges": null
}

View file

@ -1,750 +0,0 @@
{
"fields": [
{
"name": "jacob",
"composite": {
"fields": [
{
"name": "style",
"composite": {
"fields": [
{
"name": "fill",
"primary": {
"value": {
"range": "TestCompile/filters/errors/no-glob.d2,1:7:22-1:10:25",
"value": [
{
"string": "red",
"raw_string": "red"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/filters/errors/no-glob.d2,1:1:16-1:5:20",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
},
"key_path": {
"range": "TestCompile/filters/errors/no-glob.d2,1:1:16-1:5:20",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,1:1:16-1:5:20",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/errors/no-glob.d2,1:1:16-1:10:25",
"key": {
"range": "TestCompile/filters/errors/no-glob.d2,1:1:16-1:5:20",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,1:1:16-1:5:20",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,1:7:22-1:10:25",
"value": [
{
"string": "red",
"raw_string": "red"
}
]
}
}
}
}
}
]
},
{
"name": "multiple",
"primary": {
"value": {
"range": "TestCompile/filters/errors/no-glob.d2,2:11:37-2:15:41",
"value": true
}
},
"references": [
{
"string": {
"range": "TestCompile/filters/errors/no-glob.d2,2:1:27-2:9:35",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
},
"key_path": {
"range": "TestCompile/filters/errors/no-glob.d2,2:1:27-2:9:35",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,2:1:27-2:9:35",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/errors/no-glob.d2,2:1:27-2:15:41",
"key": {
"range": "TestCompile/filters/errors/no-glob.d2,2:1:27-2:9:35",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,2:1:27-2:9:35",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
}
}
]
},
"primary": {},
"value": {
"boolean": {
"range": "TestCompile/filters/errors/no-glob.d2,2:11:37-2:15:41",
"value": true
}
}
}
}
}
]
}
],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/filters/errors/no-glob.d2,0:6:6-0:11:11",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
},
"key_path": {
"range": "TestCompile/filters/errors/no-glob.d2,0:0:0-0:11:11",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,0:0:0-0:5:5",
"value": [
{
"string": "jacob",
"raw_string": "jacob"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,0:6:6-0:11:11",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/errors/no-glob.d2,0:0:0-3:1:43",
"key": {
"range": "TestCompile/filters/errors/no-glob.d2,0:0:0-0:11:11",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,0:0:0-0:5:5",
"value": [
{
"string": "jacob",
"raw_string": "jacob"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,0:6:6-0:11:11",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "TestCompile/filters/errors/no-glob.d2,0:13:13-3:1:43",
"nodes": [
{
"map_key": {
"range": "TestCompile/filters/errors/no-glob.d2,1:1:16-1:10:25",
"key": {
"range": "TestCompile/filters/errors/no-glob.d2,1:1:16-1:5:20",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,1:1:16-1:5:20",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,1:7:22-1:10:25",
"value": [
{
"string": "red",
"raw_string": "red"
}
]
}
}
}
},
{
"map_key": {
"range": "TestCompile/filters/errors/no-glob.d2,2:1:27-2:15:41",
"key": {
"range": "TestCompile/filters/errors/no-glob.d2,2:1:27-2:9:35",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,2:1:27-2:9:35",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
}
}
]
},
"primary": {},
"value": {
"boolean": {
"range": "TestCompile/filters/errors/no-glob.d2,2:11:37-2:15:41",
"value": true
}
}
}
}
]
}
}
}
}
}
]
}
],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/filters/errors/no-glob.d2,0:0:0-0:5:5",
"value": [
{
"string": "jacob",
"raw_string": "jacob"
}
]
},
"key_path": {
"range": "TestCompile/filters/errors/no-glob.d2,0:0:0-0:11:11",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,0:0:0-0:5:5",
"value": [
{
"string": "jacob",
"raw_string": "jacob"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,0:6:6-0:11:11",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/errors/no-glob.d2,0:0:0-3:1:43",
"key": {
"range": "TestCompile/filters/errors/no-glob.d2,0:0:0-0:11:11",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,0:0:0-0:5:5",
"value": [
{
"string": "jacob",
"raw_string": "jacob"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,0:6:6-0:11:11",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "TestCompile/filters/errors/no-glob.d2,0:13:13-3:1:43",
"nodes": [
{
"map_key": {
"range": "TestCompile/filters/errors/no-glob.d2,1:1:16-1:10:25",
"key": {
"range": "TestCompile/filters/errors/no-glob.d2,1:1:16-1:5:20",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,1:1:16-1:5:20",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,1:7:22-1:10:25",
"value": [
{
"string": "red",
"raw_string": "red"
}
]
}
}
}
},
{
"map_key": {
"range": "TestCompile/filters/errors/no-glob.d2,2:1:27-2:15:41",
"key": {
"range": "TestCompile/filters/errors/no-glob.d2,2:1:27-2:9:35",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,2:1:27-2:9:35",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
}
}
]
},
"primary": {},
"value": {
"boolean": {
"range": "TestCompile/filters/errors/no-glob.d2,2:11:37-2:15:41",
"value": true
}
}
}
}
]
}
}
}
}
}
]
},
{
"name": "jasmine",
"composite": {
"fields": [
{
"name": "style",
"composite": {
"fields": null,
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/filters/errors/no-glob.d2,5:8:53-5:13:58",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
},
"key_path": {
"range": "TestCompile/filters/errors/no-glob.d2,5:0:45-5:13:58",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,5:0:45-5:7:52",
"value": [
{
"string": "jasmine",
"raw_string": "jasmine"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,5:8:53-5:13:58",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/errors/no-glob.d2,5:0:45-8:1:94",
"key": {
"range": "TestCompile/filters/errors/no-glob.d2,5:0:45-5:13:58",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,5:0:45-5:7:52",
"value": [
{
"string": "jasmine",
"raw_string": "jasmine"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,5:8:53-5:13:58",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "TestCompile/filters/errors/no-glob.d2,5:15:60-8:1:94",
"nodes": [
{
"map_key": {
"range": "TestCompile/filters/errors/no-glob.d2,6:2:64-6:12:74",
"ampersand": true,
"key": {
"range": "TestCompile/filters/errors/no-glob.d2,6:3:65-6:7:69",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,6:3:65-6:7:69",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,6:9:71-6:12:74",
"value": [
{
"string": "red",
"raw_string": "red"
}
]
}
}
}
},
{
"map_key": {
"range": "TestCompile/filters/errors/no-glob.d2,7:2:77-7:17:92",
"key": {
"range": "TestCompile/filters/errors/no-glob.d2,7:2:77-7:10:85",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,7:2:77-7:10:85",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
}
}
]
},
"primary": {},
"value": {
"boolean": {
"range": "TestCompile/filters/errors/no-glob.d2,7:12:87-7:17:92",
"value": false
}
}
}
}
]
}
}
}
}
}
]
}
],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/filters/errors/no-glob.d2,5:0:45-5:7:52",
"value": [
{
"string": "jasmine",
"raw_string": "jasmine"
}
]
},
"key_path": {
"range": "TestCompile/filters/errors/no-glob.d2,5:0:45-5:13:58",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,5:0:45-5:7:52",
"value": [
{
"string": "jasmine",
"raw_string": "jasmine"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,5:8:53-5:13:58",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/errors/no-glob.d2,5:0:45-8:1:94",
"key": {
"range": "TestCompile/filters/errors/no-glob.d2,5:0:45-5:13:58",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,5:0:45-5:7:52",
"value": [
{
"string": "jasmine",
"raw_string": "jasmine"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,5:8:53-5:13:58",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "TestCompile/filters/errors/no-glob.d2,5:15:60-8:1:94",
"nodes": [
{
"map_key": {
"range": "TestCompile/filters/errors/no-glob.d2,6:2:64-6:12:74",
"ampersand": true,
"key": {
"range": "TestCompile/filters/errors/no-glob.d2,6:3:65-6:7:69",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,6:3:65-6:7:69",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,6:9:71-6:12:74",
"value": [
{
"string": "red",
"raw_string": "red"
}
]
}
}
}
},
{
"map_key": {
"range": "TestCompile/filters/errors/no-glob.d2,7:2:77-7:17:92",
"key": {
"range": "TestCompile/filters/errors/no-glob.d2,7:2:77-7:10:85",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/errors/no-glob.d2,7:2:77-7:10:85",
"value": [
{
"string": "multiple",
"raw_string": "multiple"
}
]
}
}
]
},
"primary": {},
"value": {
"boolean": {
"range": "TestCompile/filters/errors/no-glob.d2,7:12:87-7:17:92",
"value": false
}
}
}
}
]
}
}
}
}
}
]
}
],
"edges": null
}

View file

@ -1,560 +0,0 @@
{
"fields": [
{
"name": "jacob",
"composite": {
"fields": [
{
"name": "shape",
"primary": {
"value": {
"range": "TestCompile/filters/escaped.d2,1:8:17-1:14:23",
"value": [
{
"string": "circle",
"raw_string": "circle"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/filters/escaped.d2,1:1:10-1:6:15",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
},
"key_path": {
"range": "TestCompile/filters/escaped.d2,1:1:10-1:6:15",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,1:1:10-1:6:15",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/escaped.d2,1:1:10-1:14:23",
"key": {
"range": "TestCompile/filters/escaped.d2,1:1:10-1:6:15",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,1:1:10-1:6:15",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,1:8:17-1:14:23",
"value": [
{
"string": "circle",
"raw_string": "circle"
}
]
}
}
}
}
},
{
"string": {
"range": "TestCompile/filters/escaped.d2,7:2:63-7:7:68",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
},
"key_path": {
"range": "TestCompile/filters/escaped.d2,7:2:63-7:7:68",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,7:2:63-7:7:68",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/escaped.d2,7:1:62-7:18:79",
"ampersand": true,
"key": {
"range": "TestCompile/filters/escaped.d2,7:2:63-7:7:68",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,7:2:63-7:7:68",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,7:9:70-7:18:79",
"value": [
{
"string": "rectangle",
"raw_string": "rectangle"
}
]
}
}
}
}
}
]
}
],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/filters/escaped.d2,0:0:0-0:5:5",
"value": [
{
"string": "jacob",
"raw_string": "jacob"
}
]
},
"key_path": {
"range": "TestCompile/filters/escaped.d2,0:0:0-0:5:5",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,0:0:0-0:5:5",
"value": [
{
"string": "jacob",
"raw_string": "jacob"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/escaped.d2,0:0:0-2:1:25",
"key": {
"range": "TestCompile/filters/escaped.d2,0:0:0-0:5:5",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,0:0:0-0:5:5",
"value": [
{
"string": "jacob",
"raw_string": "jacob"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "TestCompile/filters/escaped.d2,0:7:7-2:1:25",
"nodes": [
{
"map_key": {
"range": "TestCompile/filters/escaped.d2,1:1:10-1:14:23",
"key": {
"range": "TestCompile/filters/escaped.d2,1:1:10-1:6:15",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,1:1:10-1:6:15",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,1:8:17-1:14:23",
"value": [
{
"string": "circle",
"raw_string": "circle"
}
]
}
}
}
}
]
}
}
}
}
}
]
},
{
"name": "jeremy",
"composite": {
"fields": [
{
"name": "shape",
"primary": {
"value": {
"range": "TestCompile/filters/escaped.d2,7:9:70-7:18:79",
"value": [
{
"string": "rectangle",
"raw_string": "rectangle"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/filters/escaped.d2,4:1:37-4:6:42",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
},
"key_path": {
"range": "TestCompile/filters/escaped.d2,4:1:37-4:6:42",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,4:1:37-4:6:42",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/escaped.d2,4:1:37-4:17:53",
"key": {
"range": "TestCompile/filters/escaped.d2,4:1:37-4:6:42",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,4:1:37-4:6:42",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,4:8:44-4:17:53",
"value": [
{
"string": "rectangle",
"raw_string": "rectangle"
}
]
}
}
}
}
},
{
"string": {
"range": "TestCompile/filters/escaped.d2,7:2:63-7:7:68",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
},
"key_path": {
"range": "TestCompile/filters/escaped.d2,7:2:63-7:7:68",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,7:2:63-7:7:68",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/escaped.d2,7:1:62-7:18:79",
"ampersand": true,
"key": {
"range": "TestCompile/filters/escaped.d2,7:2:63-7:7:68",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,7:2:63-7:7:68",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,7:9:70-7:18:79",
"value": [
{
"string": "rectangle",
"raw_string": "rectangle"
}
]
}
}
}
}
}
]
},
{
"name": "label",
"primary": {
"value": {
"range": "TestCompile/filters/escaped.d2,8:8:88-8:23:103",
"value": [
{
"string": "I'm a rectangle",
"raw_string": "I'm a rectangle"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/filters/escaped.d2,8:1:81-8:6:86",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
},
"key_path": {
"range": "TestCompile/filters/escaped.d2,8:1:81-8:6:86",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,8:1:81-8:6:86",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/escaped.d2,8:1:81-8:23:103",
"key": {
"range": "TestCompile/filters/escaped.d2,8:1:81-8:6:86",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,8:1:81-8:6:86",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,8:8:88-8:23:103",
"value": [
{
"string": "I'm a rectangle",
"raw_string": "I'm a rectangle"
}
]
}
}
}
}
}
]
}
],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/filters/escaped.d2,3:0:26-3:6:32",
"value": [
{
"string": "jeremy",
"raw_string": "jeremy"
}
]
},
"key_path": {
"range": "TestCompile/filters/escaped.d2,3:0:26-3:6:32",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,3:0:26-3:6:32",
"value": [
{
"string": "jeremy",
"raw_string": "jeremy"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/escaped.d2,3:0:26-5:1:55",
"key": {
"range": "TestCompile/filters/escaped.d2,3:0:26-3:6:32",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,3:0:26-3:6:32",
"value": [
{
"string": "jeremy",
"raw_string": "jeremy"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "TestCompile/filters/escaped.d2,3:8:34-5:1:55",
"nodes": [
{
"map_key": {
"range": "TestCompile/filters/escaped.d2,4:1:37-4:17:53",
"key": {
"range": "TestCompile/filters/escaped.d2,4:1:37-4:6:42",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,4:1:37-4:6:42",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/escaped.d2,4:8:44-4:17:53",
"value": [
{
"string": "rectangle",
"raw_string": "rectangle"
}
]
}
}
}
}
]
}
}
}
}
}
]
}
],
"edges": null
}

3607
testdata/d2ir/TestCompile/filters/label-filter/1.exp.json generated vendored Normal file

File diff suppressed because it is too large Load diff

2928
testdata/d2ir/TestCompile/filters/label-filter/2.exp.json generated vendored Normal file

File diff suppressed because it is too large Load diff

901
testdata/d2ir/TestCompile/filters/lazy-filter.exp.json generated vendored Normal file
View file

@ -0,0 +1,901 @@
{
"fields": [
{
"name": "a",
"composite": {
"fields": [
{
"name": "style",
"composite": {
"fields": [
{
"name": "fill",
"primary": {
"value": {
"range": "TestCompile/filters/lazy-filter.d2,3:14:32-3:20:38",
"value": [
{
"string": "yellow",
"raw_string": "yellow"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/filters/lazy-filter.d2,3:8:26-3:12:30",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
},
"key_path": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:12:30",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:7:25",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,3:8:26-3:12:30",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:20:38",
"key": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:12:30",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:7:25",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,3:8:26-3:12:30",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,3:14:32-3:20:38",
"value": [
{
"string": "yellow",
"raw_string": "yellow"
}
]
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": true
}
]
}
],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:7:25",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
},
"key_path": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:12:30",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:7:25",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,3:8:26-3:12:30",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:20:38",
"key": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:12:30",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:7:25",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,3:8:26-3:12:30",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,3:14:32-3:20:38",
"value": [
{
"string": "yellow",
"raw_string": "yellow"
}
]
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": true
}
]
}
],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/filters/lazy-filter.d2,6:0:42-6:1:43",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
},
"key_path": {
"range": "TestCompile/filters/lazy-filter.d2,6:0:42-6:1:43",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,6:0:42-6:1:43",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/lazy-filter.d2,6:0:42-6:1:43",
"key": {
"range": "TestCompile/filters/lazy-filter.d2,6:0:42-6:1:43",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,6:0:42-6:1:43",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"primary": {},
"value": {}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
{
"name": "b",
"composite": {
"fields": [
{
"name": "label",
"primary": {
"value": {
"range": "TestCompile/filters/lazy-filter.d2,9:9:109-9:10:110",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/filters/lazy-filter.d2,9:2:102-9:7:107",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
},
"key_path": {
"range": "TestCompile/filters/lazy-filter.d2,9:0:100-9:7:107",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,9:0:100-9:1:101",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,9:2:102-9:7:107",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/lazy-filter.d2,9:0:100-9:10:110",
"key": {
"range": "TestCompile/filters/lazy-filter.d2,9:0:100-9:7:107",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,9:0:100-9:1:101",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,9:2:102-9:7:107",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,9:9:109-9:10:110",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
"range": "TestCompile/filters/lazy-filter.d2,2:3:9-2:8:14",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
},
"key_path": {
"range": "TestCompile/filters/lazy-filter.d2,2:3:9-2:8:14",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,2:3:9-2:8:14",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/lazy-filter.d2,2:2:8-2:11:17",
"ampersand": true,
"key": {
"range": "TestCompile/filters/lazy-filter.d2,2:3:9-2:8:14",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,2:3:9-2:8:14",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,2:10:16-2:11:17",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": true
},
{
"string": {
"range": "TestCompile/filters/lazy-filter.d2,2:3:9-2:8:14",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
},
"key_path": {
"range": "TestCompile/filters/lazy-filter.d2,2:3:9-2:8:14",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,2:3:9-2:8:14",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/lazy-filter.d2,2:2:8-2:11:17",
"ampersand": true,
"key": {
"range": "TestCompile/filters/lazy-filter.d2,2:3:9-2:8:14",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,2:3:9-2:8:14",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,2:10:16-2:11:17",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": true
},
{
"string": {
"range": "TestCompile/filters/lazy-filter.d2,2:3:9-2:8:14",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
},
"key_path": {
"range": "TestCompile/filters/lazy-filter.d2,2:3:9-2:8:14",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,2:3:9-2:8:14",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/lazy-filter.d2,2:2:8-2:11:17",
"ampersand": true,
"key": {
"range": "TestCompile/filters/lazy-filter.d2,2:3:9-2:8:14",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,2:3:9-2:8:14",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,2:10:16-2:11:17",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": true
}
]
},
{
"name": "style",
"composite": {
"fields": [
{
"name": "fill",
"primary": {
"value": {
"range": "TestCompile/filters/lazy-filter.d2,3:14:32-3:20:38",
"value": [
{
"string": "yellow",
"raw_string": "yellow"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/filters/lazy-filter.d2,3:8:26-3:12:30",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
},
"key_path": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:12:30",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:7:25",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,3:8:26-3:12:30",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:20:38",
"key": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:12:30",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:7:25",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,3:8:26-3:12:30",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,3:14:32-3:20:38",
"value": [
{
"string": "yellow",
"raw_string": "yellow"
}
]
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": true
}
]
}
],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:7:25",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
},
"key_path": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:12:30",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:7:25",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,3:8:26-3:12:30",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:20:38",
"key": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:12:30",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:7:25",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,3:8:26-3:12:30",
"value": [
{
"string": "fill",
"raw_string": "fill"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,3:14:32-3:20:38",
"value": [
{
"string": "yellow",
"raw_string": "yellow"
}
]
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": true
}
]
}
],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/filters/lazy-filter.d2,8:0:98-8:1:99",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
},
"key_path": {
"range": "TestCompile/filters/lazy-filter.d2,8:0:98-8:1:99",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,8:0:98-8:1:99",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/lazy-filter.d2,8:0:98-8:1:99",
"key": {
"range": "TestCompile/filters/lazy-filter.d2,8:0:98-8:1:99",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,8:0:98-8:1:99",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"primary": {},
"value": {}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
"range": "TestCompile/filters/lazy-filter.d2,9:0:100-9:1:101",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
},
"key_path": {
"range": "TestCompile/filters/lazy-filter.d2,9:0:100-9:7:107",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,9:0:100-9:1:101",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,9:2:102-9:7:107",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/lazy-filter.d2,9:0:100-9:10:110",
"key": {
"range": "TestCompile/filters/lazy-filter.d2,9:0:100-9:7:107",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,9:0:100-9:1:101",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,9:2:102-9:7:107",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/lazy-filter.d2,9:9:109-9:10:110",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
],
"edges": null
}

View file

@ -77,7 +77,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -139,7 +141,9 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -235,7 +239,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -316,7 +322,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -378,7 +386,73 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
},
{
"string": {
"range": "TestCompile/filters/order.d2,8:2:87-8:7:92",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
},
"key_path": {
"range": "TestCompile/filters/order.d2,8:2:87-8:7:92",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/order.d2,8:2:87-8:7:92",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/filters/order.d2,8:1:86-8:18:103",
"ampersand": true,
"key": {
"range": "TestCompile/filters/order.d2,8:2:87-8:7:92",
"path": [
{
"unquoted_string": {
"range": "TestCompile/filters/order.d2,8:2:87-8:7:92",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/filters/order.d2,8:9:94-8:18:103",
"value": [
{
"string": "rectangle",
"raw_string": "rectangle"
}
]
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
},
@ -455,7 +529,9 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -551,7 +627,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

2355
testdata/d2ir/TestCompile/filters/primary-filter.exp.json generated vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,159 +0,0 @@
{
"fields": [
{
"name": "animal",
"primary": {
"value": {
"range": "TestCompile/globs/escaped.d2,0:8:8-0:12:12",
"value": [
{
"string": "meow",
"raw_string": "meow"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/globs/escaped.d2,0:0:0-0:6:6",
"value": [
{
"string": "animal",
"raw_string": "animal"
}
]
},
"key_path": {
"range": "TestCompile/globs/escaped.d2,0:0:0-0:6:6",
"path": [
{
"unquoted_string": {
"range": "TestCompile/globs/escaped.d2,0:0:0-0:6:6",
"value": [
{
"string": "animal",
"raw_string": "animal"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/globs/escaped.d2,0:0:0-0:12:12",
"key": {
"range": "TestCompile/globs/escaped.d2,0:0:0-0:6:6",
"path": [
{
"unquoted_string": {
"range": "TestCompile/globs/escaped.d2,0:0:0-0:6:6",
"value": [
{
"string": "animal",
"raw_string": "animal"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/globs/escaped.d2,0:8:8-0:12:12",
"value": [
{
"string": "meow",
"raw_string": "meow"
}
]
}
}
}
}
}
]
},
{
"name": "action",
"primary": {
"value": {
"range": "TestCompile/globs/escaped.d2,1:8:21-1:11:24",
"value": [
{
"string": "yes",
"raw_string": "yes"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/globs/escaped.d2,1:0:13-1:6:19",
"value": [
{
"string": "action",
"raw_string": "action"
}
]
},
"key_path": {
"range": "TestCompile/globs/escaped.d2,1:0:13-1:6:19",
"path": [
{
"unquoted_string": {
"range": "TestCompile/globs/escaped.d2,1:0:13-1:6:19",
"value": [
{
"string": "action",
"raw_string": "action"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/globs/escaped.d2,1:0:13-1:11:24",
"key": {
"range": "TestCompile/globs/escaped.d2,1:0:13-1:6:19",
"path": [
{
"unquoted_string": {
"range": "TestCompile/globs/escaped.d2,1:0:13-1:6:19",
"value": [
{
"string": "action",
"raw_string": "action"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/globs/escaped.d2,1:8:21-1:11:24",
"value": [
{
"string": "yes",
"raw_string": "yes"
}
]
}
}
}
}
}
]
}
],
"edges": null
}

View file

@ -1,159 +0,0 @@
{
"fields": [
{
"name": "animal",
"primary": {
"value": {
"range": "TestCompile/globs/prefix.d2,0:8:8-0:12:12",
"value": [
{
"string": "meow",
"raw_string": "meow"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/globs/prefix.d2,0:0:0-0:6:6",
"value": [
{
"string": "animal",
"raw_string": "animal"
}
]
},
"key_path": {
"range": "TestCompile/globs/prefix.d2,0:0:0-0:6:6",
"path": [
{
"unquoted_string": {
"range": "TestCompile/globs/prefix.d2,0:0:0-0:6:6",
"value": [
{
"string": "animal",
"raw_string": "animal"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/globs/prefix.d2,0:0:0-0:12:12",
"key": {
"range": "TestCompile/globs/prefix.d2,0:0:0-0:6:6",
"path": [
{
"unquoted_string": {
"range": "TestCompile/globs/prefix.d2,0:0:0-0:6:6",
"value": [
{
"string": "animal",
"raw_string": "animal"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/globs/prefix.d2,0:8:8-0:12:12",
"value": [
{
"string": "meow",
"raw_string": "meow"
}
]
}
}
}
}
}
]
},
{
"name": "action",
"primary": {
"value": {
"range": "TestCompile/globs/prefix.d2,1:8:21-1:11:24",
"value": [
{
"string": "yes",
"raw_string": "yes"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/globs/prefix.d2,1:0:13-1:6:19",
"value": [
{
"string": "action",
"raw_string": "action"
}
]
},
"key_path": {
"range": "TestCompile/globs/prefix.d2,1:0:13-1:6:19",
"path": [
{
"unquoted_string": {
"range": "TestCompile/globs/prefix.d2,1:0:13-1:6:19",
"value": [
{
"string": "action",
"raw_string": "action"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/globs/prefix.d2,1:0:13-1:11:24",
"key": {
"range": "TestCompile/globs/prefix.d2,1:0:13-1:6:19",
"path": [
{
"unquoted_string": {
"range": "TestCompile/globs/prefix.d2,1:0:13-1:6:19",
"value": [
{
"string": "action",
"raw_string": "action"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/globs/prefix.d2,1:8:21-1:11:24",
"value": [
{
"string": "yes",
"raw_string": "yes"
}
]
}
}
}
}
}
]
}
],
"edges": null
}

View file

@ -1,82 +0,0 @@
{
"fields": [
{
"name": "x",
"primary": {
"value": {
"range": "x.d2,0:3:3-0:7:7",
"value": [
{
"string": "wowa",
"raw_string": "wowa"
}
]
}
},
"references": [
{
"string": {
"range": "x.d2,0:0:0-0:1:1",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
},
"key_path": {
"range": "x.d2,0:0:0-0:1:1",
"path": [
{
"unquoted_string": {
"range": "x.d2,0:0:0-0:1:1",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "x.d2,0:0:0-0:7:7",
"key": {
"range": "x.d2,0:0:0-0:1:1",
"path": [
{
"unquoted_string": {
"range": "x.d2,0:0:0-0:1:1",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "x.d2,0:3:3-0:7:7",
"value": [
{
"string": "wowa",
"raw_string": "wowa"
}
]
}
}
}
}
}
]
}
],
"edges": null
}

View file

@ -98,7 +98,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -187,7 +189,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -297,7 +301,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -386,7 +392,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -450,7 +458,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -526,7 +536,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -631,7 +643,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -707,7 +721,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -812,7 +828,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -1,249 +0,0 @@
{
"fields": [
{
"name": "x",
"composite": {
"fields": [
{
"name": "shape",
"primary": {
"value": {
"range": "x.d2,1:8:13-1:14:19",
"value": [
{
"string": "circle",
"raw_string": "circle"
}
]
}
},
"references": [
{
"string": {
"range": "x.d2,1:1:6-1:6:11",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
},
"key_path": {
"range": "x.d2,1:1:6-1:6:11",
"path": [
{
"unquoted_string": {
"range": "x.d2,1:1:6-1:6:11",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "x.d2,1:1:6-1:14:19",
"key": {
"range": "x.d2,1:1:6-1:6:11",
"path": [
{
"unquoted_string": {
"range": "x.d2,1:1:6-1:6:11",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "x.d2,1:8:13-1:14:19",
"value": [
{
"string": "circle",
"raw_string": "circle"
}
]
}
}
}
}
}
]
},
{
"name": "label",
"primary": {
"value": {
"range": "x.d2,2:8:28-2:12:32",
"value": [
{
"string": "meow",
"raw_string": "meow"
}
]
}
},
"references": [
{
"string": {
"range": "x.d2,2:1:21-2:6:26",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
},
"key_path": {
"range": "x.d2,2:1:21-2:6:26",
"path": [
{
"unquoted_string": {
"range": "x.d2,2:1:21-2:6:26",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "x.d2,2:1:21-2:12:32",
"key": {
"range": "x.d2,2:1:21-2:6:26",
"path": [
{
"unquoted_string": {
"range": "x.d2,2:1:21-2:6:26",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "x.d2,2:8:28-2:12:32",
"value": [
{
"string": "meow",
"raw_string": "meow"
}
]
}
}
}
}
}
]
}
],
"edges": null
},
"references": [
{
"string": {
"range": "index.d2,0:0:0-0:1:1",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
},
"key_path": {
"range": "index.d2,0:0:0-0:1:1",
"path": [
{
"unquoted_string": {
"range": "index.d2,0:0:0-0:1:1",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "index.d2,0:0:0-0:7:7",
"key": {
"range": "index.d2,0:0:0-0:1:1",
"path": [
{
"unquoted_string": {
"range": "index.d2,0:0:0-0:1:1",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
}
]
},
"primary": {},
"value": {
"import": {
"range": "index.d2,0:3:3-0:7:7",
"spread": false,
"path": [
{
"unquoted_string": {
"range": "index.d2,0:4:4-0:5:5",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
},
{
"unquoted_string": {
"range": "index.d2,0:6:6-0:7:7",
"value": [
{
"string": "y",
"raw_string": "y"
}
]
}
}
]
}
}
}
}
}
]
}
],
"edges": null
}

View file

@ -97,7 +97,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -77,7 +77,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -154,7 +156,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -241,7 +245,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -93,7 +93,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -52,7 +52,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -108,7 +110,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -67,7 +67,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -123,7 +125,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -217,7 +221,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -73,7 +73,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -52,7 +52,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -116,7 +118,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -172,7 +176,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -248,7 +254,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -308,7 +316,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -364,7 +374,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -440,7 +452,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -587,7 +601,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -651,7 +667,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -707,7 +725,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -783,7 +803,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -843,7 +865,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -899,7 +923,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -955,7 +981,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1031,7 +1059,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1178,7 +1208,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -77,7 +77,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -154,7 +156,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -230,7 +234,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -77,7 +77,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -160,7 +162,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -252,7 +256,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -69,7 +69,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -126,7 +128,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -218,7 +222,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -304,7 +310,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -392,7 +400,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -69,7 +69,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -126,7 +128,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -218,7 +222,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -304,7 +310,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -392,7 +400,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

File diff suppressed because it is too large Load diff

View file

@ -229,7 +229,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -449,7 +451,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -640,7 +644,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -865,7 +871,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -1085,7 +1093,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -1311,7 +1321,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -1531,7 +1543,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -111,7 +111,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -226,7 +228,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -342,7 +346,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -443,7 +449,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -544,7 +552,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -652,7 +662,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -789,7 +801,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -892,7 +906,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -5,7 +5,7 @@
"references": [
{
"string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:1:63",
"value": [
{
"string": "b",
@ -14,11 +14,11 @@
]
},
"key_path": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:1:63",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:1:63",
"value": [
{
"string": "b",
@ -31,33 +31,13 @@
},
"context": {
"edge": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:6:68",
"src": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2",
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:1:63",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2",
"value": [
{
"string": "*",
"raw_string": "*"
}
],
"pattern": [
"*"
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:1:63",
"value": [
{
"string": "b",
@ -68,39 +48,36 @@
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:5:67-4:6:68",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:5:67-4:6:68",
"value": [
{
"string": "c",
"raw_string": "c"
}
]
}
}
]
},
"dst_arrow": ">"
},
"key": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:0:0-0:24:24",
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:6:68",
"edges": [
{
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:6:68",
"src": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2",
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:1:63",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2",
"value": [
{
"string": "*",
"raw_string": "*"
}
],
"pattern": [
"*"
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:1:63",
"value": [
{
"string": "b",
@ -111,50 +88,149 @@
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:5:67-4:6:68",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:5:67-4:6:68",
"value": [
{
"string": "c",
"raw_string": "c"
}
]
}
}
]
},
"dst_arrow": ">"
}
],
"edge_key": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:19:19",
"primary": {},
"value": {}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
{
"name": "c",
"references": [
{
"string": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:5:67-4:6:68",
"value": [
{
"string": "c",
"raw_string": "c"
}
]
},
"key_path": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:5:67-4:6:68",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:5:67-4:6:68",
"value": [
{
"string": "c",
"raw_string": "c"
}
]
}
}
]
},
"context": {
"edge": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:6:68",
"src": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:1:63",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:14:14",
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:1:63",
"value": [
{
"string": "style",
"raw_string": "style"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:15:15-0:19:19",
"value": [
{
"string": "fill",
"raw_string": "fill"
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:21:21-0:24:24",
"value": [
{
"string": "red",
"raw_string": "red"
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:5:67-4:6:68",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:5:67-4:6:68",
"value": [
{
"string": "c",
"raw_string": "c"
}
]
}
]
}
]
},
"dst_arrow": ">"
},
"key": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:6:68",
"edges": [
{
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:6:68",
"src": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:1:63",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:1:63",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:5:67-4:6:68",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:5:67-4:6:68",
"value": [
{
"string": "c",
"raw_string": "c"
}
]
}
}
]
},
"dst_arrow": ">"
}
}
],
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -167,7 +243,7 @@
],
"src_arrow": false,
"dst_path": [
"b"
"c"
],
"dst_arrow": true,
"index": 0,
@ -180,10 +256,10 @@
"composite": {
"fields": [
{
"name": "fill",
"name": "stroke",
"primary": {
"value": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:21:21-0:24:24",
"range": "TestCompile/patterns/alixander-review/8.d2,2:26:57-2:29:60",
"value": [
{
"string": "red",
@ -195,20 +271,20 @@
"references": [
{
"string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:15:15-0:19:19",
"range": "TestCompile/patterns/alixander-review/8.d2,2:18:49-2:24:55",
"value": [
{
"string": "fill",
"raw_string": "fill"
"string": "stroke",
"raw_string": "stroke"
}
]
},
"key_path": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:19:19",
"range": "TestCompile/patterns/alixander-review/8.d2,2:12:43-2:24:55",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:14:14",
"range": "TestCompile/patterns/alixander-review/8.d2,2:12:43-2:17:48",
"value": [
{
"string": "style",
@ -219,11 +295,11 @@
},
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:15:15-0:19:19",
"range": "TestCompile/patterns/alixander-review/8.d2,2:18:49-2:24:55",
"value": [
{
"string": "fill",
"raw_string": "fill"
"string": "stroke",
"raw_string": "stroke"
}
]
}
@ -232,13 +308,13 @@
},
"context": {
"edge": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,2:1:32-2:7:38",
"src": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2",
"range": "TestCompile/patterns/alixander-review/8.d2,2:1:32-2:2:33",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2",
"range": "TestCompile/patterns/alixander-review/8.d2,2:1:32-2:2:33",
"value": [
{
"string": "*",
@ -254,16 +330,19 @@
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,2:6:37-2:7:38",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,2:6:37-2:7:38",
"value": [
{
"string": "b",
"raw_string": "b"
"string": "*",
"raw_string": "*"
}
],
"pattern": [
"*"
]
}
}
@ -272,16 +351,16 @@
"dst_arrow": ">"
},
"key": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:0:0-0:24:24",
"range": "TestCompile/patterns/alixander-review/8.d2,2:0:31-2:29:60",
"edges": [
{
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,2:1:32-2:7:38",
"src": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2",
"range": "TestCompile/patterns/alixander-review/8.d2,2:1:32-2:2:33",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2",
"range": "TestCompile/patterns/alixander-review/8.d2,2:1:32-2:2:33",
"value": [
{
"string": "*",
@ -297,16 +376,19 @@
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,2:6:37-2:7:38",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,2:6:37-2:7:38",
"value": [
{
"string": "b",
"raw_string": "b"
"string": "*",
"raw_string": "*"
}
],
"pattern": [
"*"
]
}
}
@ -315,12 +397,17 @@
"dst_arrow": ">"
}
],
"edge_index": {
"range": "TestCompile/patterns/alixander-review/8.d2,2:8:39-2:11:42",
"int": null,
"glob": true
},
"edge_key": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:19:19",
"range": "TestCompile/patterns/alixander-review/8.d2,2:12:43-2:24:55",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:14:14",
"range": "TestCompile/patterns/alixander-review/8.d2,2:12:43-2:17:48",
"value": [
{
"string": "style",
@ -331,11 +418,11 @@
},
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:15:15-0:19:19",
"range": "TestCompile/patterns/alixander-review/8.d2,2:18:49-2:24:55",
"value": [
{
"string": "fill",
"raw_string": "fill"
"string": "stroke",
"raw_string": "stroke"
}
]
}
@ -345,7 +432,7 @@
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:21:21-0:24:24",
"range": "TestCompile/patterns/alixander-review/8.d2,2:26:57-2:29:60",
"value": [
{
"string": "red",
@ -355,7 +442,9 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": true
}
]
}
@ -365,7 +454,7 @@
"references": [
{
"string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:14:14",
"range": "TestCompile/patterns/alixander-review/8.d2,2:12:43-2:17:48",
"value": [
{
"string": "style",
@ -374,11 +463,11 @@
]
},
"key_path": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:19:19",
"range": "TestCompile/patterns/alixander-review/8.d2,2:12:43-2:24:55",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:14:14",
"range": "TestCompile/patterns/alixander-review/8.d2,2:12:43-2:17:48",
"value": [
{
"string": "style",
@ -389,11 +478,11 @@
},
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:15:15-0:19:19",
"range": "TestCompile/patterns/alixander-review/8.d2,2:18:49-2:24:55",
"value": [
{
"string": "fill",
"raw_string": "fill"
"string": "stroke",
"raw_string": "stroke"
}
]
}
@ -402,13 +491,13 @@
},
"context": {
"edge": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,2:1:32-2:7:38",
"src": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2",
"range": "TestCompile/patterns/alixander-review/8.d2,2:1:32-2:2:33",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2",
"range": "TestCompile/patterns/alixander-review/8.d2,2:1:32-2:2:33",
"value": [
{
"string": "*",
@ -424,16 +513,19 @@
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,2:6:37-2:7:38",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,2:6:37-2:7:38",
"value": [
{
"string": "b",
"raw_string": "b"
"string": "*",
"raw_string": "*"
}
],
"pattern": [
"*"
]
}
}
@ -442,16 +534,16 @@
"dst_arrow": ">"
},
"key": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:0:0-0:24:24",
"range": "TestCompile/patterns/alixander-review/8.d2,2:0:31-2:29:60",
"edges": [
{
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,2:1:32-2:7:38",
"src": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2",
"range": "TestCompile/patterns/alixander-review/8.d2,2:1:32-2:2:33",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2",
"range": "TestCompile/patterns/alixander-review/8.d2,2:1:32-2:2:33",
"value": [
{
"string": "*",
@ -467,16 +559,19 @@
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,2:6:37-2:7:38",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,2:6:37-2:7:38",
"value": [
{
"string": "b",
"raw_string": "b"
"string": "*",
"raw_string": "*"
}
],
"pattern": [
"*"
]
}
}
@ -485,12 +580,17 @@
"dst_arrow": ">"
}
],
"edge_index": {
"range": "TestCompile/patterns/alixander-review/8.d2,2:8:39-2:11:42",
"int": null,
"glob": true
},
"edge_key": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:19:19",
"range": "TestCompile/patterns/alixander-review/8.d2,2:12:43-2:24:55",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:14:14",
"range": "TestCompile/patterns/alixander-review/8.d2,2:12:43-2:17:48",
"value": [
{
"string": "style",
@ -501,11 +601,11 @@
},
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:15:15-0:19:19",
"range": "TestCompile/patterns/alixander-review/8.d2,2:18:49-2:24:55",
"value": [
{
"string": "fill",
"raw_string": "fill"
"string": "stroke",
"raw_string": "stroke"
}
]
}
@ -515,7 +615,7 @@
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:21:21-0:24:24",
"range": "TestCompile/patterns/alixander-review/8.d2,2:26:57-2:29:60",
"value": [
{
"string": "red",
@ -525,7 +625,9 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": true
}
]
}
@ -536,13 +638,100 @@
{
"context": {
"edge": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:6:68",
"src": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2",
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:1:63",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2",
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:1:63",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:5:67-4:6:68",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:5:67-4:6:68",
"value": [
{
"string": "c",
"raw_string": "c"
}
]
}
}
]
},
"dst_arrow": ">"
},
"key": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:6:68",
"edges": [
{
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:6:68",
"src": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:1:63",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:0:62-4:1:63",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:5:67-4:6:68",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/alixander-review/8.d2,4:5:67-4:6:68",
"value": [
{
"string": "c",
"raw_string": "c"
}
]
}
}
]
},
"dst_arrow": ">"
}
],
"primary": {},
"value": {}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"context": {
"edge": {
"range": "TestCompile/patterns/alixander-review/8.d2,2:1:32-2:7:38",
"src": {
"range": "TestCompile/patterns/alixander-review/8.d2,2:1:32-2:2:33",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/alixander-review/8.d2,2:1:32-2:2:33",
"value": [
{
"string": "*",
@ -558,16 +747,19 @@
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,2:6:37-2:7:38",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,2:6:37-2:7:38",
"value": [
{
"string": "b",
"raw_string": "b"
"string": "*",
"raw_string": "*"
}
],
"pattern": [
"*"
]
}
}
@ -576,16 +768,16 @@
"dst_arrow": ">"
},
"key": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:0:0-0:24:24",
"range": "TestCompile/patterns/alixander-review/8.d2,2:0:31-2:29:60",
"edges": [
{
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,2:1:32-2:7:38",
"src": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2",
"range": "TestCompile/patterns/alixander-review/8.d2,2:1:32-2:2:33",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:1:1-0:2:2",
"range": "TestCompile/patterns/alixander-review/8.d2,2:1:32-2:2:33",
"value": [
{
"string": "*",
@ -601,16 +793,19 @@
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,2:6:37-2:7:38",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:6:6-0:7:7",
"range": "TestCompile/patterns/alixander-review/8.d2,2:6:37-2:7:38",
"value": [
{
"string": "b",
"raw_string": "b"
"string": "*",
"raw_string": "*"
}
],
"pattern": [
"*"
]
}
}
@ -619,12 +814,17 @@
"dst_arrow": ">"
}
],
"edge_index": {
"range": "TestCompile/patterns/alixander-review/8.d2,2:8:39-2:11:42",
"int": null,
"glob": true
},
"edge_key": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:19:19",
"range": "TestCompile/patterns/alixander-review/8.d2,2:12:43-2:24:55",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:9:9-0:14:14",
"range": "TestCompile/patterns/alixander-review/8.d2,2:12:43-2:17:48",
"value": [
{
"string": "style",
@ -635,11 +835,11 @@
},
{
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:15:15-0:19:19",
"range": "TestCompile/patterns/alixander-review/8.d2,2:18:49-2:24:55",
"value": [
{
"string": "fill",
"raw_string": "fill"
"string": "stroke",
"raw_string": "stroke"
}
]
}
@ -649,7 +849,7 @@
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/patterns/errors/glob-edge-glob-index.d2,0:21:21-0:24:24",
"range": "TestCompile/patterns/alixander-review/8.d2,2:26:57-2:29:60",
"value": [
{
"string": "red",
@ -659,7 +859,9 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": true
}
]
}

View file

@ -1,159 +0,0 @@
{
"fields": [
{
"name": "animal",
"primary": {
"value": {
"range": "TestCompile/patterns/case.d2,2:4:29-2:11:36",
"value": [
{
"string": "globbed",
"raw_string": "globbed"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/patterns/case.d2,0:0:0-0:6:6",
"value": [
{
"string": "animal",
"raw_string": "animal"
}
]
},
"key_path": {
"range": "TestCompile/patterns/case.d2,0:0:0-0:6:6",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/case.d2,0:0:0-0:6:6",
"value": [
{
"string": "animal",
"raw_string": "animal"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/patterns/case.d2,0:0:0-0:12:12",
"key": {
"range": "TestCompile/patterns/case.d2,0:0:0-0:6:6",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/case.d2,0:0:0-0:6:6",
"value": [
{
"string": "animal",
"raw_string": "animal"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/patterns/case.d2,0:8:8-0:12:12",
"value": [
{
"string": "meow",
"raw_string": "meow"
}
]
}
}
}
}
}
]
},
{
"name": "action",
"primary": {
"value": {
"range": "TestCompile/patterns/case.d2,2:4:29-2:11:36",
"value": [
{
"string": "globbed",
"raw_string": "globbed"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/patterns/case.d2,1:0:13-1:6:19",
"value": [
{
"string": "action",
"raw_string": "action"
}
]
},
"key_path": {
"range": "TestCompile/patterns/case.d2,1:0:13-1:6:19",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/case.d2,1:0:13-1:6:19",
"value": [
{
"string": "action",
"raw_string": "action"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/patterns/case.d2,1:0:13-1:11:24",
"key": {
"range": "TestCompile/patterns/case.d2,1:0:13-1:6:19",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/case.d2,1:0:13-1:6:19",
"value": [
{
"string": "action",
"raw_string": "action"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/patterns/case.d2,1:8:21-1:11:24",
"value": [
{
"string": "yes",
"raw_string": "yes"
}
]
}
}
}
}
}
]
}
],
"edges": null
}

View file

@ -73,7 +73,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -150,7 +152,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -63,7 +63,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -130,7 +132,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -139,7 +139,9 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -260,7 +262,9 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -339,7 +343,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -478,7 +484,9 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -599,7 +607,9 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -678,7 +688,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -813,7 +825,9 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -934,7 +948,9 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -1013,7 +1029,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -1086,7 +1104,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

File diff suppressed because it is too large Load diff

View file

@ -56,7 +56,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -116,7 +118,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -172,7 +176,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -281,7 +287,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -442,7 +450,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -600,7 +610,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
},
@ -747,7 +759,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -883,7 +897,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
},
@ -1018,7 +1034,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
},
@ -1153,7 +1171,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}

View file

@ -56,7 +56,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -112,7 +114,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -221,7 +225,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -363,7 +369,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
},
@ -423,7 +431,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -509,7 +519,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -667,7 +679,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -803,7 +817,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}

View file

@ -163,7 +163,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -220,7 +222,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -367,7 +371,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -503,7 +509,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}

File diff suppressed because it is too large Load diff

View file

@ -52,7 +52,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -108,7 +110,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -164,7 +168,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -220,7 +226,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -341,7 +349,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -450,7 +460,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
},
@ -557,7 +569,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
},
@ -664,7 +678,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
},
@ -771,7 +787,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}

View file

@ -52,7 +52,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -108,7 +110,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -227,7 +231,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
},
@ -344,7 +350,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}

View file

@ -78,7 +78,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -156,7 +158,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -295,7 +299,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
},
@ -432,7 +438,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -510,7 +518,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -583,7 +593,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -78,7 +78,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -156,7 +158,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -335,7 +339,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
},
@ -512,7 +518,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -590,7 +598,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -663,7 +673,9 @@
"primary": {},
"value": {}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

View file

@ -73,7 +73,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -150,7 +152,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -227,7 +231,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,143 @@
{
"fields": [
{
"name": "before",
"primary": {
"value": {
"range": "globs.d2,2:5:24-2:9:28",
"value": [
{
"string": "meow",
"raw_string": "meow"
}
]
}
},
"references": [
{
"string": {
"range": "index.d2,0:0:0-0:6:6",
"value": [
{
"string": "before",
"raw_string": "before"
}
]
},
"key_path": {
"range": "index.d2,0:0:0-0:6:6",
"path": [
{
"unquoted_string": {
"range": "index.d2,0:0:0-0:6:6",
"value": [
{
"string": "before",
"raw_string": "before"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "index.d2,0:0:0-0:6:6",
"key": {
"range": "index.d2,0:0:0-0:6:6",
"path": [
{
"unquoted_string": {
"range": "index.d2,0:0:0-0:6:6",
"value": [
{
"string": "before",
"raw_string": "before"
}
]
}
}
]
},
"primary": {},
"value": {}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
{
"name": "after",
"primary": {
"value": {
"range": "globs.d2,2:5:24-2:9:28",
"value": [
{
"string": "meow",
"raw_string": "meow"
}
]
}
},
"references": [
{
"string": {
"range": "index.d2,0:22:22-0:27:27",
"value": [
{
"string": "after",
"raw_string": "after"
}
]
},
"key_path": {
"range": "index.d2,0:22:22-0:27:27",
"path": [
{
"unquoted_string": {
"range": "index.d2,0:22:22-0:27:27",
"value": [
{
"string": "after",
"raw_string": "after"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "index.d2,0:22:22-0:27:27",
"key": {
"range": "index.d2,0:22:22-0:27:27",
"path": [
{
"unquoted_string": {
"range": "index.d2,0:22:22-0:27:27",
"value": [
{
"string": "after",
"raw_string": "after"
}
]
}
}
]
},
"primary": {},
"value": {}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
],
"edges": null
}

1415
testdata/d2ir/TestCompile/patterns/import-glob/2.exp.json generated vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -125,7 +125,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -236,7 +238,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -381,7 +385,9 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -492,7 +498,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
@ -621,7 +629,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
@ -732,7 +742,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
@ -877,7 +889,9 @@
}
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
@ -988,7 +1002,9 @@
}
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}

1147
testdata/d2ir/TestCompile/patterns/override/1.exp.json generated vendored Normal file

File diff suppressed because it is too large Load diff

2506
testdata/d2ir/TestCompile/patterns/override/2.exp.json generated vendored Normal file

File diff suppressed because it is too large Load diff

8530
testdata/d2ir/TestCompile/patterns/override/3.exp.json generated vendored Normal file

File diff suppressed because it is too large Load diff

861
testdata/d2ir/TestCompile/patterns/override/4.exp.json generated vendored Normal file
View file

@ -0,0 +1,861 @@
{
"fields": [
{
"name": "a",
"references": [
{
"string": {
"range": "TestCompile/patterns/override/4.d2,3:0:28-3:1:29",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
},
"key_path": {
"range": "TestCompile/patterns/override/4.d2,3:0:28-3:1:29",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,3:0:28-3:1:29",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"context": {
"edge": {
"range": "TestCompile/patterns/override/4.d2,3:0:28-3:6:34",
"src": {
"range": "TestCompile/patterns/override/4.d2,3:0:28-3:1:29",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,3:0:28-3:1:29",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/4.d2,3:5:33-3:6:34",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,3:5:33-3:6:34",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"dst_arrow": ">"
},
"key": {
"range": "TestCompile/patterns/override/4.d2,3:0:28-5:1:52",
"edges": [
{
"range": "TestCompile/patterns/override/4.d2,3:0:28-3:6:34",
"src": {
"range": "TestCompile/patterns/override/4.d2,3:0:28-3:1:29",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,3:0:28-3:1:29",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/4.d2,3:5:33-3:6:34",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,3:5:33-3:6:34",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"dst_arrow": ">"
}
],
"primary": {},
"value": {
"map": {
"range": "TestCompile/patterns/override/4.d2,3:8:36-5:1:52",
"nodes": [
{
"map_key": {
"range": "TestCompile/patterns/override/4.d2,4:2:40-4:12:50",
"key": {
"range": "TestCompile/patterns/override/4.d2,4:2:40-4:7:45",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,4:2:40-4:7:45",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,4:9:47-4:12:50",
"value": [
{
"string": "bye",
"raw_string": "bye"
}
]
}
}
}
}
]
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
{
"name": "b",
"references": [
{
"string": {
"range": "TestCompile/patterns/override/4.d2,3:5:33-3:6:34",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
},
"key_path": {
"range": "TestCompile/patterns/override/4.d2,3:5:33-3:6:34",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,3:5:33-3:6:34",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"context": {
"edge": {
"range": "TestCompile/patterns/override/4.d2,3:0:28-3:6:34",
"src": {
"range": "TestCompile/patterns/override/4.d2,3:0:28-3:1:29",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,3:0:28-3:1:29",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/4.d2,3:5:33-3:6:34",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,3:5:33-3:6:34",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"dst_arrow": ">"
},
"key": {
"range": "TestCompile/patterns/override/4.d2,3:0:28-5:1:52",
"edges": [
{
"range": "TestCompile/patterns/override/4.d2,3:0:28-3:6:34",
"src": {
"range": "TestCompile/patterns/override/4.d2,3:0:28-3:1:29",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,3:0:28-3:1:29",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/4.d2,3:5:33-3:6:34",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,3:5:33-3:6:34",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"dst_arrow": ">"
}
],
"primary": {},
"value": {
"map": {
"range": "TestCompile/patterns/override/4.d2,3:8:36-5:1:52",
"nodes": [
{
"map_key": {
"range": "TestCompile/patterns/override/4.d2,4:2:40-4:12:50",
"key": {
"range": "TestCompile/patterns/override/4.d2,4:2:40-4:7:45",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,4:2:40-4:7:45",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,4:9:47-4:12:50",
"value": [
{
"string": "bye",
"raw_string": "bye"
}
]
}
}
}
}
]
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
],
"edges": [
{
"edge_id": {
"src_path": [
"a"
],
"src_arrow": false,
"dst_path": [
"b"
],
"dst_arrow": true,
"index": 0,
"glob": false
},
"map": {
"fields": [
{
"name": "label",
"primary": {
"value": {
"range": "TestCompile/patterns/override/4.d2,4:9:47-4:12:50",
"value": [
{
"string": "bye",
"raw_string": "bye"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/patterns/override/4.d2,1:16:17-1:21:22",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
},
"key_path": {
"range": "TestCompile/patterns/override/4.d2,1:16:17-1:21:22",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,1:16:17-1:21:22",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"context": {
"edge": {
"range": "TestCompile/patterns/override/4.d2,1:1:2-1:11:12",
"src": {
"range": "TestCompile/patterns/override/4.d2,1:1:2-1:4:5",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,1:1:2-1:4:5",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/4.d2,1:8:9-1:11:12",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,1:8:9-1:11:12",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"dst_arrow": ">"
},
"key": {
"range": "TestCompile/patterns/override/4.d2,1:0:1-1:25:26",
"edges": [
{
"range": "TestCompile/patterns/override/4.d2,1:1:2-1:11:12",
"src": {
"range": "TestCompile/patterns/override/4.d2,1:1:2-1:4:5",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,1:1:2-1:4:5",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/4.d2,1:8:9-1:11:12",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,1:8:9-1:11:12",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"dst_arrow": ">"
}
],
"edge_index": {
"range": "TestCompile/patterns/override/4.d2,1:12:13-1:15:16",
"int": null,
"glob": true
},
"edge_key": {
"range": "TestCompile/patterns/override/4.d2,1:16:17-1:21:22",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,1:16:17-1:21:22",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,1:23:24-1:25:26",
"value": [
{
"string": "hi",
"raw_string": "hi"
}
]
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": true
},
{
"string": {
"range": "TestCompile/patterns/override/4.d2,4:2:40-4:7:45",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
},
"key_path": {
"range": "TestCompile/patterns/override/4.d2,4:2:40-4:7:45",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,4:2:40-4:7:45",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/patterns/override/4.d2,4:2:40-4:12:50",
"key": {
"range": "TestCompile/patterns/override/4.d2,4:2:40-4:7:45",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,4:2:40-4:7:45",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,4:9:47-4:12:50",
"value": [
{
"string": "bye",
"raw_string": "bye"
}
]
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
],
"edges": null
},
"references": [
{
"context": {
"edge": {
"range": "TestCompile/patterns/override/4.d2,3:0:28-3:6:34",
"src": {
"range": "TestCompile/patterns/override/4.d2,3:0:28-3:1:29",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,3:0:28-3:1:29",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/4.d2,3:5:33-3:6:34",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,3:5:33-3:6:34",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"dst_arrow": ">"
},
"key": {
"range": "TestCompile/patterns/override/4.d2,3:0:28-5:1:52",
"edges": [
{
"range": "TestCompile/patterns/override/4.d2,3:0:28-3:6:34",
"src": {
"range": "TestCompile/patterns/override/4.d2,3:0:28-3:1:29",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,3:0:28-3:1:29",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/4.d2,3:5:33-3:6:34",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,3:5:33-3:6:34",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"dst_arrow": ">"
}
],
"primary": {},
"value": {
"map": {
"range": "TestCompile/patterns/override/4.d2,3:8:36-5:1:52",
"nodes": [
{
"map_key": {
"range": "TestCompile/patterns/override/4.d2,4:2:40-4:12:50",
"key": {
"range": "TestCompile/patterns/override/4.d2,4:2:40-4:7:45",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,4:2:40-4:7:45",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,4:9:47-4:12:50",
"value": [
{
"string": "bye",
"raw_string": "bye"
}
]
}
}
}
}
]
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"context": {
"edge": {
"range": "TestCompile/patterns/override/4.d2,1:1:2-1:11:12",
"src": {
"range": "TestCompile/patterns/override/4.d2,1:1:2-1:4:5",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,1:1:2-1:4:5",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/4.d2,1:8:9-1:11:12",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,1:8:9-1:11:12",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"dst_arrow": ">"
},
"key": {
"range": "TestCompile/patterns/override/4.d2,1:0:1-1:25:26",
"edges": [
{
"range": "TestCompile/patterns/override/4.d2,1:1:2-1:11:12",
"src": {
"range": "TestCompile/patterns/override/4.d2,1:1:2-1:4:5",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,1:1:2-1:4:5",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/4.d2,1:8:9-1:11:12",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,1:8:9-1:11:12",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"dst_arrow": ">"
}
],
"edge_index": {
"range": "TestCompile/patterns/override/4.d2,1:12:13-1:15:16",
"int": null,
"glob": true
},
"edge_key": {
"range": "TestCompile/patterns/override/4.d2,1:16:17-1:21:22",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,1:16:17-1:21:22",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/patterns/override/4.d2,1:23:24-1:25:26",
"value": [
{
"string": "hi",
"raw_string": "hi"
}
]
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": true
}
]
}
]
}

998
testdata/d2ir/TestCompile/patterns/override/5.exp.json generated vendored Normal file
View file

@ -0,0 +1,998 @@
{
"fields": [
{
"name": "a",
"references": [
{
"string": {
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:1:75",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
},
"key_path": {
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:1:75",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:1:75",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"context": {
"edge": {
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:6:80",
"src": {
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:1:75",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:1:75",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/5.d2,4:5:79-4:6:80",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,4:5:79-4:6:80",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"dst_arrow": ">"
},
"key": {
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:6:80",
"edges": [
{
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:6:80",
"src": {
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:1:75",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:1:75",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/5.d2,4:5:79-4:6:80",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,4:5:79-4:6:80",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"dst_arrow": ">"
}
],
"primary": {},
"value": {}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
{
"name": "b",
"references": [
{
"string": {
"range": "TestCompile/patterns/override/5.d2,4:5:79-4:6:80",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
},
"key_path": {
"range": "TestCompile/patterns/override/5.d2,4:5:79-4:6:80",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,4:5:79-4:6:80",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"context": {
"edge": {
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:6:80",
"src": {
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:1:75",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:1:75",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/5.d2,4:5:79-4:6:80",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,4:5:79-4:6:80",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"dst_arrow": ">"
},
"key": {
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:6:80",
"edges": [
{
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:6:80",
"src": {
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:1:75",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:1:75",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/5.d2,4:5:79-4:6:80",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,4:5:79-4:6:80",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"dst_arrow": ">"
}
],
"primary": {},
"value": {}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
],
"edges": [
{
"edge_id": {
"src_path": [
"a"
],
"src_arrow": false,
"dst_path": [
"b"
],
"dst_arrow": true,
"index": 0,
"glob": false
},
"map": {
"fields": [
{
"name": "label",
"primary": {
"value": {
"range": "TestCompile/patterns/override/5.d2,6:23:105-6:26:108",
"value": [
{
"string": "hey",
"raw_string": "hey"
}
]
}
},
"references": [
{
"string": {
"range": "TestCompile/patterns/override/5.d2,1:16:17-1:21:22",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
},
"key_path": {
"range": "TestCompile/patterns/override/5.d2,1:16:17-1:21:22",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,1:16:17-1:21:22",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"context": {
"edge": {
"range": "TestCompile/patterns/override/5.d2,1:1:2-1:11:12",
"src": {
"range": "TestCompile/patterns/override/5.d2,1:1:2-1:4:5",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,1:1:2-1:4:5",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/5.d2,1:8:9-1:11:12",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,1:8:9-1:11:12",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"dst_arrow": ">"
},
"key": {
"range": "TestCompile/patterns/override/5.d2,1:0:1-1:25:26",
"edges": [
{
"range": "TestCompile/patterns/override/5.d2,1:1:2-1:11:12",
"src": {
"range": "TestCompile/patterns/override/5.d2,1:1:2-1:4:5",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,1:1:2-1:4:5",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/5.d2,1:8:9-1:11:12",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,1:8:9-1:11:12",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"dst_arrow": ">"
}
],
"edge_index": {
"range": "TestCompile/patterns/override/5.d2,1:12:13-1:15:16",
"int": null,
"glob": true
},
"edge_key": {
"range": "TestCompile/patterns/override/5.d2,1:16:17-1:21:22",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,1:16:17-1:21:22",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,1:23:24-1:25:26",
"value": [
{
"string": "hi",
"raw_string": "hi"
}
]
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": true
},
{
"string": {
"range": "TestCompile/patterns/override/5.d2,6:16:98-6:21:103",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
},
"key_path": {
"range": "TestCompile/patterns/override/5.d2,6:16:98-6:21:103",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,6:16:98-6:21:103",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"context": {
"edge": {
"range": "TestCompile/patterns/override/5.d2,6:1:83-6:11:93",
"src": {
"range": "TestCompile/patterns/override/5.d2,6:1:83-6:4:86",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,6:1:83-6:4:86",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/5.d2,6:8:90-6:11:93",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,6:8:90-6:11:93",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"dst_arrow": ">"
},
"key": {
"range": "TestCompile/patterns/override/5.d2,6:0:82-6:26:108",
"edges": [
{
"range": "TestCompile/patterns/override/5.d2,6:1:83-6:11:93",
"src": {
"range": "TestCompile/patterns/override/5.d2,6:1:83-6:4:86",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,6:1:83-6:4:86",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/5.d2,6:8:90-6:11:93",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,6:8:90-6:11:93",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"dst_arrow": ">"
}
],
"edge_index": {
"range": "TestCompile/patterns/override/5.d2,6:12:94-6:15:97",
"int": null,
"glob": true
},
"edge_key": {
"range": "TestCompile/patterns/override/5.d2,6:16:98-6:21:103",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,6:16:98-6:21:103",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,6:23:105-6:26:108",
"value": [
{
"string": "hey",
"raw_string": "hey"
}
]
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
],
"edges": null
},
"references": [
{
"context": {
"edge": {
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:6:80",
"src": {
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:1:75",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:1:75",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/5.d2,4:5:79-4:6:80",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,4:5:79-4:6:80",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"dst_arrow": ">"
},
"key": {
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:6:80",
"edges": [
{
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:6:80",
"src": {
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:1:75",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,4:0:74-4:1:75",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/5.d2,4:5:79-4:6:80",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,4:5:79-4:6:80",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
}
]
},
"dst_arrow": ">"
}
],
"primary": {},
"value": {}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"context": {
"edge": {
"range": "TestCompile/patterns/override/5.d2,1:1:2-1:11:12",
"src": {
"range": "TestCompile/patterns/override/5.d2,1:1:2-1:4:5",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,1:1:2-1:4:5",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/5.d2,1:8:9-1:11:12",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,1:8:9-1:11:12",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"dst_arrow": ">"
},
"key": {
"range": "TestCompile/patterns/override/5.d2,1:0:1-1:25:26",
"edges": [
{
"range": "TestCompile/patterns/override/5.d2,1:1:2-1:11:12",
"src": {
"range": "TestCompile/patterns/override/5.d2,1:1:2-1:4:5",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,1:1:2-1:4:5",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/5.d2,1:8:9-1:11:12",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,1:8:9-1:11:12",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"dst_arrow": ">"
}
],
"edge_index": {
"range": "TestCompile/patterns/override/5.d2,1:12:13-1:15:16",
"int": null,
"glob": true
},
"edge_key": {
"range": "TestCompile/patterns/override/5.d2,1:16:17-1:21:22",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,1:16:17-1:21:22",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,1:23:24-1:25:26",
"value": [
{
"string": "hi",
"raw_string": "hi"
}
]
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": true
},
{
"context": {
"edge": {
"range": "TestCompile/patterns/override/5.d2,6:1:83-6:11:93",
"src": {
"range": "TestCompile/patterns/override/5.d2,6:1:83-6:4:86",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,6:1:83-6:4:86",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/5.d2,6:8:90-6:11:93",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,6:8:90-6:11:93",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"dst_arrow": ">"
},
"key": {
"range": "TestCompile/patterns/override/5.d2,6:0:82-6:26:108",
"edges": [
{
"range": "TestCompile/patterns/override/5.d2,6:1:83-6:11:93",
"src": {
"range": "TestCompile/patterns/override/5.d2,6:1:83-6:4:86",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,6:1:83-6:4:86",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"src_arrow": "",
"dst": {
"range": "TestCompile/patterns/override/5.d2,6:8:90-6:11:93",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,6:8:90-6:11:93",
"value": [
{
"string": "***",
"raw_string": "***"
}
],
"pattern": [
"*",
"",
"*",
"",
"*"
]
}
}
]
},
"dst_arrow": ">"
}
],
"edge_index": {
"range": "TestCompile/patterns/override/5.d2,6:12:94-6:15:97",
"int": null,
"glob": true
},
"edge_key": {
"range": "TestCompile/patterns/override/5.d2,6:16:98-6:21:103",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,6:16:98-6:21:103",
"value": [
{
"string": "label",
"raw_string": "label"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/patterns/override/5.d2,6:23:105-6:26:108",
"value": [
{
"string": "hey",
"raw_string": "hey"
}
]
}
}
}
},
"due_to_glob": true,
"due_to_lazy_glob": false
}
]
}
]
}

477
testdata/d2ir/TestCompile/patterns/override/6.exp.json generated vendored Normal file
View file

@ -0,0 +1,477 @@
{
"fields": [
{
"name": "a",
"composite": {
"fields": [],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/patterns/override/6.d2,2:0:29-2:1:30",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
},
"key_path": {
"range": "TestCompile/patterns/override/6.d2,2:0:29-2:1:30",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,2:0:29-2:1:30",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/patterns/override/6.d2,2:0:29-2:1:30",
"key": {
"range": "TestCompile/patterns/override/6.d2,2:0:29-2:1:30",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,2:0:29-2:1:30",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
}
]
},
"primary": {},
"value": {}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
"range": "TestCompile/patterns/override/6.d2,4:0:95-4:1:96",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
},
"key_path": {
"range": "TestCompile/patterns/override/6.d2,4:0:95-4:6:101",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,4:0:95-4:1:96",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,4:2:97-4:6:101",
"value": [
{
"string": "icon",
"raw_string": "icon"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/patterns/override/6.d2,4:0:95-4:12:107",
"key": {
"range": "TestCompile/patterns/override/6.d2,4:0:95-4:6:101",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,4:0:95-4:1:96",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,4:2:97-4:6:101",
"value": [
{
"string": "icon",
"raw_string": "icon"
}
]
}
}
]
},
"primary": {},
"value": {
"null": {
"range": "TestCompile/patterns/override/6.d2,4:8:103-4:12:107"
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
"range": "TestCompile/patterns/override/6.d2,12:0:253-12:1:254",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
},
"key_path": {
"range": "TestCompile/patterns/override/6.d2,12:0:253-12:7:260",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,12:0:253-12:1:254",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,12:2:255-12:7:260",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/patterns/override/6.d2,12:0:253-12:13:266",
"key": {
"range": "TestCompile/patterns/override/6.d2,12:0:253-12:7:260",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,12:0:253-12:1:254",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,12:2:255-12:7:260",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"null": {
"range": "TestCompile/patterns/override/6.d2,12:9:262-12:13:266"
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
{
"name": "b",
"composite": {
"fields": [],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/patterns/override/6.d2,7:0:138-7:1:139",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
},
"key_path": {
"range": "TestCompile/patterns/override/6.d2,7:0:138-7:6:144",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,7:0:138-7:1:139",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,7:2:140-7:6:144",
"value": [
{
"string": "icon",
"raw_string": "icon"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/patterns/override/6.d2,7:0:138-7:62:200",
"key": {
"range": "TestCompile/patterns/override/6.d2,7:0:138-7:6:144",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,7:0:138-7:1:139",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,7:2:140-7:6:144",
"value": [
{
"string": "icon",
"raw_string": "icon"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,7:8:146-7:62:200",
"value": [
{
"string": "https://icons.terrastruct.com/essentials%2F073-add.svg",
"raw_string": "https://icons.terrastruct.com/essentials%2F073-add.svg"
}
]
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
"range": "TestCompile/patterns/override/6.d2,8:0:201-8:1:202",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
},
"key_path": {
"range": "TestCompile/patterns/override/6.d2,8:0:201-8:6:207",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,8:0:201-8:1:202",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,8:2:203-8:6:207",
"value": [
{
"string": "icon",
"raw_string": "icon"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/patterns/override/6.d2,8:0:201-8:12:213",
"key": {
"range": "TestCompile/patterns/override/6.d2,8:0:201-8:6:207",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,8:0:201-8:1:202",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,8:2:203-8:6:207",
"value": [
{
"string": "icon",
"raw_string": "icon"
}
]
}
}
]
},
"primary": {},
"value": {
"null": {
"range": "TestCompile/patterns/override/6.d2,8:8:209-8:12:213"
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
"range": "TestCompile/patterns/override/6.d2,13:0:267-13:1:268",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
},
"key_path": {
"range": "TestCompile/patterns/override/6.d2,13:0:267-13:7:274",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,13:0:267-13:1:268",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,13:2:269-13:7:274",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/patterns/override/6.d2,13:0:267-13:13:280",
"key": {
"range": "TestCompile/patterns/override/6.d2,13:0:267-13:7:274",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,13:0:267-13:1:268",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/patterns/override/6.d2,13:2:269-13:7:274",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"null": {
"range": "TestCompile/patterns/override/6.d2,13:9:276-13:13:280"
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
],
"edges": null
}

424
testdata/d2ir/TestCompile/patterns/override/7.exp.json generated vendored Normal file
View file

@ -0,0 +1,424 @@
{
"fields": [
{
"name": "a",
"composite": {
"fields": [],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/patterns/override/7.d2,3:0:93-3:1:94",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
},
"key_path": {
"range": "TestCompile/patterns/override/7.d2,3:0:93-3:6:99",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/7.d2,3:0:93-3:1:94",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/patterns/override/7.d2,3:2:95-3:6:99",
"value": [
{
"string": "icon",
"raw_string": "icon"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/patterns/override/7.d2,3:0:93-3:12:105",
"key": {
"range": "TestCompile/patterns/override/7.d2,3:0:93-3:6:99",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/7.d2,3:0:93-3:1:94",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/patterns/override/7.d2,3:2:95-3:6:99",
"value": [
{
"string": "icon",
"raw_string": "icon"
}
]
}
}
]
},
"primary": {},
"value": {
"null": {
"range": "TestCompile/patterns/override/7.d2,3:8:101-3:12:105"
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
"range": "TestCompile/patterns/override/7.d2,11:0:251-11:1:252",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
},
"key_path": {
"range": "TestCompile/patterns/override/7.d2,11:0:251-11:7:258",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/7.d2,11:0:251-11:1:252",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/patterns/override/7.d2,11:2:253-11:7:258",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/patterns/override/7.d2,11:0:251-11:13:264",
"key": {
"range": "TestCompile/patterns/override/7.d2,11:0:251-11:7:258",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/7.d2,11:0:251-11:1:252",
"value": [
{
"string": "a",
"raw_string": "a"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/patterns/override/7.d2,11:2:253-11:7:258",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"null": {
"range": "TestCompile/patterns/override/7.d2,11:9:260-11:13:264"
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
},
{
"name": "b",
"composite": {
"fields": [],
"edges": null
},
"references": [
{
"string": {
"range": "TestCompile/patterns/override/7.d2,6:0:136-6:1:137",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
},
"key_path": {
"range": "TestCompile/patterns/override/7.d2,6:0:136-6:6:142",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/7.d2,6:0:136-6:1:137",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/patterns/override/7.d2,6:2:138-6:6:142",
"value": [
{
"string": "icon",
"raw_string": "icon"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/patterns/override/7.d2,6:0:136-6:62:198",
"key": {
"range": "TestCompile/patterns/override/7.d2,6:0:136-6:6:142",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/7.d2,6:0:136-6:1:137",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/patterns/override/7.d2,6:2:138-6:6:142",
"value": [
{
"string": "icon",
"raw_string": "icon"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "TestCompile/patterns/override/7.d2,6:8:144-6:62:198",
"value": [
{
"string": "https://icons.terrastruct.com/essentials%2F073-add.svg",
"raw_string": "https://icons.terrastruct.com/essentials%2F073-add.svg"
}
]
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
"range": "TestCompile/patterns/override/7.d2,7:0:199-7:1:200",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
},
"key_path": {
"range": "TestCompile/patterns/override/7.d2,7:0:199-7:6:205",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/7.d2,7:0:199-7:1:200",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/patterns/override/7.d2,7:2:201-7:6:205",
"value": [
{
"string": "icon",
"raw_string": "icon"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/patterns/override/7.d2,7:0:199-7:12:211",
"key": {
"range": "TestCompile/patterns/override/7.d2,7:0:199-7:6:205",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/7.d2,7:0:199-7:1:200",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/patterns/override/7.d2,7:2:201-7:6:205",
"value": [
{
"string": "icon",
"raw_string": "icon"
}
]
}
}
]
},
"primary": {},
"value": {
"null": {
"range": "TestCompile/patterns/override/7.d2,7:8:207-7:12:211"
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
},
{
"string": {
"range": "TestCompile/patterns/override/7.d2,12:0:265-12:1:266",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
},
"key_path": {
"range": "TestCompile/patterns/override/7.d2,12:0:265-12:7:272",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/7.d2,12:0:265-12:1:266",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/patterns/override/7.d2,12:2:267-12:7:272",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"context": {
"edge": null,
"key": {
"range": "TestCompile/patterns/override/7.d2,12:0:265-12:13:278",
"key": {
"range": "TestCompile/patterns/override/7.d2,12:0:265-12:7:272",
"path": [
{
"unquoted_string": {
"range": "TestCompile/patterns/override/7.d2,12:0:265-12:1:266",
"value": [
{
"string": "b",
"raw_string": "b"
}
]
}
},
{
"unquoted_string": {
"range": "TestCompile/patterns/override/7.d2,12:2:267-12:7:272",
"value": [
{
"string": "shape",
"raw_string": "shape"
}
]
}
}
]
},
"primary": {},
"value": {
"null": {
"range": "TestCompile/patterns/override/7.d2,12:9:274-12:13:278"
}
}
}
},
"due_to_glob": false,
"due_to_lazy_glob": false
}
]
}
],
"edges": null
}

Some files were not shown because too many files have changed in this diff Show more