Merge pull request #2231 from alixander/reserve-unquoted-string
reserved keywords must be unquoted
|
|
@ -6,6 +6,7 @@
|
|||
#### Improvements 🧹
|
||||
|
||||
- Composition: links pointing to own board are purged [#2203](https://github.com/terrastruct/d2/pull/2203)
|
||||
- Syntax: reserved keywords must be unquoted [#2231](https://github.com/terrastruct/d2/pull/2231)
|
||||
|
||||
#### Bugfixes ⛑️
|
||||
|
||||
|
|
|
|||
|
|
@ -338,6 +338,7 @@ type String interface {
|
|||
SetString(string)
|
||||
Copy() String
|
||||
_string()
|
||||
IsUnquoted() bool
|
||||
}
|
||||
|
||||
var _ String = &UnquotedString{}
|
||||
|
|
@ -611,6 +612,11 @@ func (s *DoubleQuotedString) _string() {}
|
|||
func (s *SingleQuotedString) _string() {}
|
||||
func (s *BlockString) _string() {}
|
||||
|
||||
func (s *UnquotedString) IsUnquoted() bool { return true }
|
||||
func (s *DoubleQuotedString) IsUnquoted() bool { return false }
|
||||
func (s *SingleQuotedString) IsUnquoted() bool { return false }
|
||||
func (s *BlockString) IsUnquoted() bool { return false }
|
||||
|
||||
type Comment struct {
|
||||
Range Range `json:"range"`
|
||||
Value string `json:"value"`
|
||||
|
|
@ -1059,7 +1065,22 @@ func MakeKeyPath(a []string) *KeyPath {
|
|||
return kp
|
||||
}
|
||||
|
||||
func (kp *KeyPath) IDA() (ida []string) {
|
||||
func MakeKeyPathString(a []String) *KeyPath {
|
||||
kp := &KeyPath{}
|
||||
for _, el := range a {
|
||||
kp.Path = append(kp.Path, MakeValueBox(RawString(el.ScalarString(), true)).StringBox())
|
||||
}
|
||||
return kp
|
||||
}
|
||||
|
||||
func (kp *KeyPath) IDA() (ida []String) {
|
||||
for _, el := range kp.Path {
|
||||
ida = append(ida, el.Unbox())
|
||||
}
|
||||
return ida
|
||||
}
|
||||
|
||||
func (kp *KeyPath) StringIDA() (ida []string) {
|
||||
for _, el := range kp.Path {
|
||||
ida = append(ida, el.Unbox().ScalarString())
|
||||
}
|
||||
|
|
@ -1572,9 +1593,9 @@ func (s *Substitution) IDA() (ida []string) {
|
|||
return ida
|
||||
}
|
||||
|
||||
func (i *Import) IDA() (ida []string) {
|
||||
func (i *Import) IDA() (ida []String) {
|
||||
for _, el := range i.Path[1:] {
|
||||
ida = append(ida, el.Unbox().ScalarString())
|
||||
ida = append(ida, el.Unbox())
|
||||
}
|
||||
return ida
|
||||
}
|
||||
|
|
|
|||
|
|
@ -349,7 +349,7 @@ func Run(ctx context.Context, ms *xmain.State) (err error) {
|
|||
if err != nil {
|
||||
return xmain.UsageErrorf("invalid target: %s", *targetFlag)
|
||||
}
|
||||
boardPath = key.IDA()
|
||||
boardPath = key.StringIDA()
|
||||
}
|
||||
|
||||
ctx, cancel := timelib.WithTimeout(ctx, time.Minute*2)
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ func (c *compiler) compileBoard(g *d2graph.Graph, ir *d2ir.Map) *d2graph.Graph {
|
|||
}
|
||||
|
||||
func (c *compiler) compileBoardsField(g *d2graph.Graph, ir *d2ir.Map, fieldName string) {
|
||||
boards := ir.GetField(fieldName)
|
||||
boards := ir.GetField(d2ast.FlatUnquotedString(fieldName))
|
||||
if boards.Map() == nil {
|
||||
return
|
||||
}
|
||||
|
|
@ -119,8 +119,8 @@ func (c *compiler) compileBoardsField(g *d2graph.Graph, ir *d2ir.Map, fieldName
|
|||
if f.Map() == nil {
|
||||
m = &d2ir.Map{}
|
||||
}
|
||||
if g.GetBoard(f.Name) != nil {
|
||||
c.errorf(f.References[0].AST(), "board name %v already used by another board", f.Name)
|
||||
if g.GetBoard(f.Name.ScalarString()) != nil {
|
||||
c.errorf(f.References[0].AST(), "board name %v already used by another board", f.Name.ScalarString())
|
||||
continue
|
||||
}
|
||||
g2 := d2graph.NewGraph()
|
||||
|
|
@ -133,7 +133,7 @@ func (c *compiler) compileBoardsField(g *d2graph.Graph, ir *d2ir.Map, fieldName
|
|||
if f.Primary() != nil {
|
||||
c.compileLabel(&g2.Root.Attributes, f)
|
||||
}
|
||||
g2.Name = f.Name
|
||||
g2.Name = f.Name.ScalarString()
|
||||
switch fieldName {
|
||||
case "layers":
|
||||
g.Layers = append(g.Layers, g2)
|
||||
|
|
@ -149,7 +149,7 @@ func findFieldAST(ast *d2ast.Map, f *d2ir.Field) *d2ast.Map {
|
|||
path := []string{}
|
||||
curr := f
|
||||
for {
|
||||
path = append([]string{curr.Name}, path...)
|
||||
path = append([]string{curr.Name.ScalarString()}, path...)
|
||||
boardKind := d2ir.NodeBoardKind(curr)
|
||||
if boardKind == "" {
|
||||
break
|
||||
|
|
@ -224,7 +224,7 @@ func (c *compiler) errorf(n d2ast.Node, f string, v ...interface{}) {
|
|||
}
|
||||
|
||||
func (c *compiler) compileMap(obj *d2graph.Object, m *d2ir.Map) {
|
||||
class := m.GetField("class")
|
||||
class := m.GetField(d2ast.FlatUnquotedString("class"))
|
||||
if class != nil {
|
||||
var classNames []string
|
||||
if class.Primary() != nil {
|
||||
|
|
@ -265,7 +265,7 @@ func (c *compiler) compileMap(obj *d2graph.Object, m *d2ir.Map) {
|
|||
}
|
||||
}
|
||||
}
|
||||
shape := m.GetField("shape")
|
||||
shape := m.GetField(d2ast.FlatUnquotedString("shape"))
|
||||
if shape != nil {
|
||||
if shape.Composite != nil {
|
||||
c.errorf(shape.LastPrimaryKey(), "reserved field shape does not accept composite")
|
||||
|
|
@ -274,10 +274,10 @@ func (c *compiler) compileMap(obj *d2graph.Object, m *d2ir.Map) {
|
|||
}
|
||||
}
|
||||
for _, f := range m.Fields {
|
||||
if f.Name == "shape" {
|
||||
if f.Name.ScalarString() == "shape" && f.Name.IsUnquoted() {
|
||||
continue
|
||||
}
|
||||
if _, ok := d2ast.BoardKeywords[f.Name]; ok {
|
||||
if _, ok := d2ast.BoardKeywords[f.Name.ScalarString()]; ok && f.Name.IsUnquoted() {
|
||||
continue
|
||||
}
|
||||
c.compileField(obj, f)
|
||||
|
|
@ -298,14 +298,15 @@ func (c *compiler) compileMap(obj *d2graph.Object, m *d2ir.Map) {
|
|||
}
|
||||
|
||||
func (c *compiler) compileField(obj *d2graph.Object, f *d2ir.Field) {
|
||||
keyword := strings.ToLower(f.Name)
|
||||
keyword := strings.ToLower(f.Name.ScalarString())
|
||||
_, isStyleReserved := d2ast.StyleKeywords[keyword]
|
||||
if isStyleReserved {
|
||||
c.errorf(f.LastRef().AST(), "%v must be style.%v", f.Name, f.Name)
|
||||
if isStyleReserved && f.Name.IsUnquoted() {
|
||||
c.errorf(f.LastRef().AST(), "%v must be style.%v", f.Name.ScalarString(), f.Name.ScalarString())
|
||||
return
|
||||
}
|
||||
_, isReserved := d2ast.SimpleReservedKeywords[keyword]
|
||||
if f.Name == "classes" {
|
||||
isReserved = isReserved && f.Name.IsUnquoted()
|
||||
if f.Name.ScalarString() == "classes" && f.Name.IsUnquoted() {
|
||||
if f.Map() != nil {
|
||||
if len(f.Map().Edges) > 0 {
|
||||
c.errorf(f.Map().Edges[0].LastRef().AST(), "classes cannot contain an edge")
|
||||
|
|
@ -315,26 +316,26 @@ func (c *compiler) compileField(obj *d2graph.Object, f *d2ir.Field) {
|
|||
continue
|
||||
}
|
||||
for _, cf := range classesField.Map().Fields {
|
||||
if _, ok := d2ast.ReservedKeywords[cf.Name]; !ok {
|
||||
c.errorf(cf.LastRef().AST(), "%s is an invalid class field, must be reserved keyword", cf.Name)
|
||||
if _, ok := d2ast.ReservedKeywords[cf.Name.ScalarString()]; !(ok && f.Name.IsUnquoted()) {
|
||||
c.errorf(cf.LastRef().AST(), "%s is an invalid class field, must be reserved keyword", cf.Name.ScalarString())
|
||||
}
|
||||
if cf.Name == "class" {
|
||||
if cf.Name.ScalarString() == "class" && cf.Name.IsUnquoted() {
|
||||
c.errorf(cf.LastRef().AST(), `"class" cannot appear within "classes"`)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
} else if f.Name == "vars" {
|
||||
} else if f.Name.ScalarString() == "vars" && f.Name.IsUnquoted() {
|
||||
return
|
||||
} else if f.Name == "source-arrowhead" || f.Name == "target-arrowhead" {
|
||||
c.errorf(f.LastRef().AST(), `%#v can only be used on connections`, f.Name)
|
||||
} else if (f.Name.ScalarString() == "source-arrowhead" || f.Name.ScalarString() == "target-arrowhead") && f.Name.IsUnquoted() {
|
||||
c.errorf(f.LastRef().AST(), `%#v can only be used on connections`, f.Name.ScalarString())
|
||||
return
|
||||
|
||||
} else if isReserved {
|
||||
c.compileReserved(&obj.Attributes, f)
|
||||
return
|
||||
} else if f.Name == "style" {
|
||||
} else if f.Name.ScalarString() == "style" && f.Name.IsUnquoted() {
|
||||
if f.Map() == nil || len(f.Map().Fields) == 0 {
|
||||
c.errorf(f.LastRef().AST(), `"style" expected to be set to a map of key-values, or contain an additional keyword like "style.opacity: 0.4"`)
|
||||
return
|
||||
|
|
@ -358,7 +359,7 @@ func (c *compiler) compileField(obj *d2graph.Object, f *d2ir.Field) {
|
|||
}
|
||||
|
||||
parent := obj
|
||||
obj = obj.EnsureChild(d2graphIDA([]string{f.Name}))
|
||||
obj = obj.EnsureChild(([]d2ast.String{f.Name}))
|
||||
if f.Primary() != nil {
|
||||
c.compileLabel(&obj.Attributes, f)
|
||||
}
|
||||
|
|
@ -387,7 +388,7 @@ func (c *compiler) compileField(obj *d2graph.Object, f *d2ir.Field) {
|
|||
IsVar: d2ir.IsVar(fr.Context_.ScopeMap),
|
||||
}
|
||||
if fr.Context_.ScopeMap != nil && !d2ir.IsVar(fr.Context_.ScopeMap) {
|
||||
scopeObjIDA := d2graphIDA(d2ir.BoardIDA(fr.Context_.ScopeMap))
|
||||
scopeObjIDA := d2ir.BoardIDA(fr.Context_.ScopeMap)
|
||||
r.ScopeObj = obj.Graph.Root.EnsureChild(scopeObjIDA)
|
||||
}
|
||||
obj.References = append(obj.References, r)
|
||||
|
|
@ -440,7 +441,7 @@ func (c *compiler) compilePosition(attrs *d2graph.Attributes, f *d2ir.Field) {
|
|||
name := f.Name
|
||||
if f.Map() != nil {
|
||||
for _, f := range f.Map().Fields {
|
||||
if f.Name == "near" {
|
||||
if f.Name.ScalarString() == "near" && f.Name.IsUnquoted() {
|
||||
if f.Primary() == nil {
|
||||
c.errorf(f.LastPrimaryKey(), `invalid "near" field`)
|
||||
} else {
|
||||
|
|
@ -452,7 +453,7 @@ func (c *compiler) compilePosition(attrs *d2graph.Attributes, f *d2ir.Field) {
|
|||
if _, ok := d2ast.LabelPositions[scalar.ScalarString()]; !ok {
|
||||
c.errorf(f.LastPrimaryKey(), `invalid "near" field`)
|
||||
} else {
|
||||
switch name {
|
||||
switch name.ScalarString() {
|
||||
case "label":
|
||||
attrs.LabelPosition = &d2graph.Scalar{}
|
||||
attrs.LabelPosition.Value = scalar.ScalarString()
|
||||
|
|
@ -467,7 +468,7 @@ func (c *compiler) compilePosition(attrs *d2graph.Attributes, f *d2ir.Field) {
|
|||
}
|
||||
} else {
|
||||
if f.LastPrimaryKey() != nil {
|
||||
c.errorf(f.LastPrimaryKey(), `unexpected field %s`, f.Name)
|
||||
c.errorf(f.LastPrimaryKey(), `unexpected field %s`, f.Name.ScalarString())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -480,7 +481,7 @@ func (c *compiler) compilePosition(attrs *d2graph.Attributes, f *d2ir.Field) {
|
|||
func (c *compiler) compileReserved(attrs *d2graph.Attributes, f *d2ir.Field) {
|
||||
if f.Primary() == nil {
|
||||
if f.Composite != nil {
|
||||
switch f.Name {
|
||||
switch f.Name.ScalarString() {
|
||||
case "class":
|
||||
if arr, ok := f.Composite.(*d2ir.Array); ok {
|
||||
for _, class := range arr.Values {
|
||||
|
|
@ -505,13 +506,13 @@ func (c *compiler) compileReserved(attrs *d2graph.Attributes, f *d2ir.Field) {
|
|||
case "label", "icon":
|
||||
c.compilePosition(attrs, f)
|
||||
default:
|
||||
c.errorf(f.LastPrimaryKey(), "reserved field %v does not accept composite", f.Name)
|
||||
c.errorf(f.LastPrimaryKey(), "reserved field %v does not accept composite", f.Name.ScalarString())
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
scalar := f.Primary().Value
|
||||
switch f.Name {
|
||||
switch f.Name.ScalarString() {
|
||||
case "label":
|
||||
c.compileLabel(attrs, f)
|
||||
c.compilePosition(attrs, f)
|
||||
|
|
@ -695,8 +696,8 @@ func (c *compiler) compileStyle(attrs *d2graph.Attributes, m *d2ir.Map) {
|
|||
}
|
||||
|
||||
func (c *compiler) compileStyleField(attrs *d2graph.Attributes, f *d2ir.Field) {
|
||||
if _, ok := d2ast.StyleKeywords[strings.ToLower(f.Name)]; !ok {
|
||||
c.errorf(f.LastRef().AST(), `invalid style keyword: "%s"`, f.Name)
|
||||
if _, ok := d2ast.StyleKeywords[strings.ToLower(f.Name.ScalarString())]; !(ok && f.Name.IsUnquoted()) {
|
||||
c.errorf(f.LastRef().AST(), `invalid style keyword: "%s"`, f.Name.ScalarString())
|
||||
return
|
||||
}
|
||||
if f.Primary() == nil {
|
||||
|
|
@ -704,7 +705,7 @@ func (c *compiler) compileStyleField(attrs *d2graph.Attributes, f *d2ir.Field) {
|
|||
}
|
||||
compileStyleFieldInit(attrs, f)
|
||||
scalar := f.Primary().Value
|
||||
err := attrs.Style.Apply(f.Name, scalar.ScalarString())
|
||||
err := attrs.Style.Apply(f.Name.ScalarString(), scalar.ScalarString())
|
||||
if err != nil {
|
||||
c.errorf(scalar, err.Error())
|
||||
return
|
||||
|
|
@ -712,7 +713,7 @@ func (c *compiler) compileStyleField(attrs *d2graph.Attributes, f *d2ir.Field) {
|
|||
}
|
||||
|
||||
func compileStyleFieldInit(attrs *d2graph.Attributes, f *d2ir.Field) {
|
||||
switch f.Name {
|
||||
switch f.Name.ScalarString() {
|
||||
case "opacity":
|
||||
attrs.Style.Opacity = &d2graph.Scalar{MapKey: f.LastPrimaryKey()}
|
||||
case "stroke":
|
||||
|
|
@ -765,7 +766,7 @@ func compileStyleFieldInit(attrs *d2graph.Attributes, f *d2ir.Field) {
|
|||
}
|
||||
|
||||
func (c *compiler) compileEdge(obj *d2graph.Object, e *d2ir.Edge) {
|
||||
edge, err := obj.Connect(d2graphIDA(e.ID.SrcPath), d2graphIDA(e.ID.DstPath), e.ID.SrcArrow, e.ID.DstArrow, "")
|
||||
edge, err := obj.Connect(e.ID.SrcPath, e.ID.DstPath, e.ID.SrcArrow, e.ID.DstArrow, "")
|
||||
if err != nil {
|
||||
c.errorf(e.References[0].AST(), err.Error())
|
||||
return
|
||||
|
|
@ -789,7 +790,7 @@ func (c *compiler) compileEdge(obj *d2graph.Object, e *d2ir.Edge) {
|
|||
ScopeObj: obj,
|
||||
}
|
||||
if er.Context_.ScopeMap != nil && !d2ir.IsVar(er.Context_.ScopeMap) {
|
||||
scopeObjIDA := d2graphIDA(d2ir.BoardIDA(er.Context_.ScopeMap))
|
||||
scopeObjIDA := d2ir.BoardIDA(er.Context_.ScopeMap)
|
||||
r.ScopeObj = edge.Src.Graph.Root.EnsureChild(scopeObjIDA)
|
||||
}
|
||||
edge.References = append(edge.References, r)
|
||||
|
|
@ -797,7 +798,7 @@ func (c *compiler) compileEdge(obj *d2graph.Object, e *d2ir.Edge) {
|
|||
}
|
||||
|
||||
func (c *compiler) compileEdgeMap(edge *d2graph.Edge, m *d2ir.Map) {
|
||||
class := m.GetField("class")
|
||||
class := m.GetField(d2ast.FlatUnquotedString("class"))
|
||||
if class != nil {
|
||||
var classNames []string
|
||||
if class.Primary() != nil {
|
||||
|
|
@ -824,8 +825,8 @@ func (c *compiler) compileEdgeMap(edge *d2graph.Edge, m *d2ir.Map) {
|
|||
}
|
||||
}
|
||||
for _, f := range m.Fields {
|
||||
_, ok := d2ast.ReservedKeywords[f.Name]
|
||||
if !ok {
|
||||
_, ok := d2ast.ReservedKeywords[f.Name.ScalarString()]
|
||||
if !(ok && f.Name.IsUnquoted()) {
|
||||
c.errorf(f.References[0].AST(), `edge map keys must be reserved keywords`)
|
||||
continue
|
||||
}
|
||||
|
|
@ -834,17 +835,18 @@ func (c *compiler) compileEdgeMap(edge *d2graph.Edge, m *d2ir.Map) {
|
|||
}
|
||||
|
||||
func (c *compiler) compileEdgeField(edge *d2graph.Edge, f *d2ir.Field) {
|
||||
keyword := strings.ToLower(f.Name)
|
||||
keyword := strings.ToLower(f.Name.ScalarString())
|
||||
_, isStyleReserved := d2ast.StyleKeywords[keyword]
|
||||
isStyleReserved = isStyleReserved && f.Name.IsUnquoted()
|
||||
if isStyleReserved {
|
||||
c.errorf(f.LastRef().AST(), "%v must be style.%v", f.Name, f.Name)
|
||||
c.errorf(f.LastRef().AST(), "%v must be style.%v", f.Name.ScalarString(), f.Name.ScalarString())
|
||||
return
|
||||
}
|
||||
_, isReserved := d2ast.SimpleReservedKeywords[keyword]
|
||||
if isReserved {
|
||||
c.compileReserved(&edge.Attributes, f)
|
||||
return
|
||||
} else if f.Name == "style" {
|
||||
} else if f.Name.ScalarString() == "style" {
|
||||
if f.Map() == nil {
|
||||
return
|
||||
}
|
||||
|
|
@ -852,14 +854,14 @@ func (c *compiler) compileEdgeField(edge *d2graph.Edge, f *d2ir.Field) {
|
|||
return
|
||||
}
|
||||
|
||||
if f.Name == "source-arrowhead" || f.Name == "target-arrowhead" {
|
||||
if (f.Name.ScalarString() == "source-arrowhead" || f.Name.ScalarString() == "target-arrowhead") && f.Name.IsUnquoted() {
|
||||
c.compileArrowheads(edge, f)
|
||||
}
|
||||
}
|
||||
|
||||
func (c *compiler) compileArrowheads(edge *d2graph.Edge, f *d2ir.Field) {
|
||||
var attrs *d2graph.Attributes
|
||||
if f.Name == "source-arrowhead" {
|
||||
if f.Name.ScalarString() == "source-arrowhead" {
|
||||
if edge.SrcArrowhead == nil {
|
||||
edge.SrcArrowhead = &d2graph.Attributes{}
|
||||
}
|
||||
|
|
@ -877,12 +879,13 @@ func (c *compiler) compileArrowheads(edge *d2graph.Edge, f *d2ir.Field) {
|
|||
|
||||
if f.Map() != nil {
|
||||
for _, f2 := range f.Map().Fields {
|
||||
keyword := strings.ToLower(f2.Name)
|
||||
keyword := strings.ToLower(f2.Name.ScalarString())
|
||||
_, isReserved := d2ast.SimpleReservedKeywords[keyword]
|
||||
isReserved = isReserved && f2.Name.IsUnquoted()
|
||||
if isReserved {
|
||||
c.compileReserved(attrs, f2)
|
||||
continue
|
||||
} else if f2.Name == "style" {
|
||||
} else if f2.Name.ScalarString() == "style" && f2.Name.IsUnquoted() {
|
||||
if f2.Map() == nil {
|
||||
continue
|
||||
}
|
||||
|
|
@ -995,7 +998,7 @@ func (c *compiler) compileSQLTable(obj *d2graph.Object) {
|
|||
|
||||
func (c *compiler) validateKeys(obj *d2graph.Object, m *d2ir.Map) {
|
||||
for _, f := range m.Fields {
|
||||
if _, ok := d2ast.BoardKeywords[f.Name]; ok {
|
||||
if _, ok := d2ast.BoardKeywords[f.Name.ScalarString()]; ok && f.Name.IsUnquoted() {
|
||||
continue
|
||||
}
|
||||
c.validateKey(obj, f)
|
||||
|
|
@ -1003,8 +1006,9 @@ func (c *compiler) validateKeys(obj *d2graph.Object, m *d2ir.Map) {
|
|||
}
|
||||
|
||||
func (c *compiler) validateKey(obj *d2graph.Object, f *d2ir.Field) {
|
||||
keyword := strings.ToLower(f.Name)
|
||||
keyword := strings.ToLower(f.Name.ScalarString())
|
||||
_, isReserved := d2ast.ReservedKeywords[keyword]
|
||||
isReserved = isReserved && f.Name.IsUnquoted()
|
||||
if isReserved {
|
||||
switch obj.Shape.Value {
|
||||
case d2target.ShapeCircle, d2target.ShapeSquare:
|
||||
|
|
@ -1014,7 +1018,7 @@ func (c *compiler) validateKey(obj *d2graph.Object, f *d2ir.Field) {
|
|||
}
|
||||
}
|
||||
|
||||
switch f.Name {
|
||||
switch f.Name.ScalarString() {
|
||||
case "style":
|
||||
if obj.Style.ThreeDee != nil {
|
||||
if !strings.EqualFold(obj.Shape.Value, d2target.ShapeSquare) && !strings.EqualFold(obj.Shape.Value, d2target.ShapeRectangle) && !strings.EqualFold(obj.Shape.Value, d2target.ShapeHexagon) {
|
||||
|
|
@ -1049,7 +1053,7 @@ func (c *compiler) validateKey(obj *d2graph.Object, f *d2ir.Field) {
|
|||
return
|
||||
}
|
||||
|
||||
obj, ok := obj.HasChild([]string{f.Name})
|
||||
obj, ok := obj.HasChild([]string{f.Name.ScalarString()})
|
||||
if ok && f.Map() != nil {
|
||||
c.validateKeys(obj, f.Map())
|
||||
}
|
||||
|
|
@ -1226,7 +1230,7 @@ func (c *compiler) validateBoardLinks(g *d2graph.Graph) {
|
|||
continue
|
||||
}
|
||||
|
||||
if slices.Equal(linkKey.IDA(), obj.Graph.IDA()) {
|
||||
if slices.Equal(linkKey.StringIDA(), obj.Graph.IDA()) {
|
||||
obj.Link = nil
|
||||
continue
|
||||
}
|
||||
|
|
@ -1242,34 +1246,34 @@ func (c *compiler) validateBoardLinks(g *d2graph.Graph) {
|
|||
}
|
||||
}
|
||||
|
||||
func hasBoard(root *d2graph.Graph, ida []string) bool {
|
||||
func hasBoard(root *d2graph.Graph, ida []d2ast.String) bool {
|
||||
if len(ida) == 0 {
|
||||
return true
|
||||
}
|
||||
if ida[0] == "root" {
|
||||
if ida[0].ScalarString() == "root" && ida[0].IsUnquoted() {
|
||||
return hasBoard(root, ida[1:])
|
||||
}
|
||||
id := ida[0]
|
||||
if len(ida) == 1 {
|
||||
return root.Name == id
|
||||
return root.Name == id.ScalarString()
|
||||
}
|
||||
nextID := ida[1]
|
||||
switch id {
|
||||
switch id.ScalarString() {
|
||||
case "layers":
|
||||
for _, b := range root.Layers {
|
||||
if b.Name == nextID {
|
||||
if b.Name == nextID.ScalarString() {
|
||||
return hasBoard(b, ida[2:])
|
||||
}
|
||||
}
|
||||
case "scenarios":
|
||||
for _, b := range root.Scenarios {
|
||||
if b.Name == nextID {
|
||||
if b.Name == nextID.ScalarString() {
|
||||
return hasBoard(b, ida[2:])
|
||||
}
|
||||
}
|
||||
case "steps":
|
||||
for _, b := range root.Steps {
|
||||
if b.Name == nextID {
|
||||
if b.Name == nextID.ScalarString() {
|
||||
return hasBoard(b, ida[2:])
|
||||
}
|
||||
}
|
||||
|
|
@ -1284,20 +1288,10 @@ func init() {
|
|||
}
|
||||
}
|
||||
|
||||
func d2graphIDA(irIDA []string) (ida []string) {
|
||||
for _, el := range irIDA {
|
||||
n := &d2ast.KeyPath{
|
||||
Path: []*d2ast.StringBox{d2ast.MakeValueBox(d2ast.RawString(el, true)).StringBox()},
|
||||
}
|
||||
ida = append(ida, d2format.Format(n))
|
||||
}
|
||||
return ida
|
||||
}
|
||||
|
||||
// Unused for now until shape: edge_group
|
||||
func (c *compiler) preprocessSeqDiagrams(m *d2ir.Map) {
|
||||
for _, f := range m.Fields {
|
||||
if f.Name == "shape" && f.Primary_.Value.ScalarString() == d2target.ShapeSequenceDiagram {
|
||||
if f.Name.ScalarString() == "shape" && f.Name.IsUnquoted() && f.Primary_.Value.ScalarString() == d2target.ShapeSequenceDiagram {
|
||||
c.preprocessEdgeGroup(m, m)
|
||||
return
|
||||
}
|
||||
|
|
@ -1349,8 +1343,8 @@ func (c *compiler) preprocessEdgeGroup(seqDiagram, m *d2ir.Map) {
|
|||
f := srcParent.GetField(el)
|
||||
if !isEdgeGroup(f) {
|
||||
for j := 0; j < i+1; j++ {
|
||||
e.ID.SrcPath = append([]string{"_"}, e.ID.SrcPath...)
|
||||
e.ID.DstPath = append([]string{"_"}, e.ID.DstPath...)
|
||||
e.ID.SrcPath = append([]d2ast.String{d2ast.FlatUnquotedString("_")}, e.ID.SrcPath...)
|
||||
e.ID.DstPath = append([]d2ast.String{d2ast.FlatUnquotedString("_")}, e.ID.DstPath...)
|
||||
}
|
||||
break
|
||||
}
|
||||
|
|
@ -1365,7 +1359,7 @@ func hoistActor(seqDiagram *d2ir.Map, f *d2ir.Field) {
|
|||
seqDiagram.Fields = append(seqDiagram.Fields, f.Copy(seqDiagram).(*d2ir.Field))
|
||||
} else {
|
||||
d2ir.OverlayField(f2, f)
|
||||
d2ir.ParentMap(f).DeleteField(f.Name)
|
||||
d2ir.ParentMap(f).DeleteField(f.Name.ScalarString())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1410,7 +1404,7 @@ func parentSeqDiagram(n d2ir.Node) *d2ir.Map {
|
|||
return nil
|
||||
}
|
||||
for _, f := range m.Fields {
|
||||
if f.Name == "shape" && f.Primary_.Value.ScalarString() == d2target.ShapeSequenceDiagram {
|
||||
if f.Name.ScalarString() == "shape" && f.Name.IsUnquoted() && f.Primary_.Value.ScalarString() == d2target.ShapeSequenceDiagram {
|
||||
return m
|
||||
}
|
||||
}
|
||||
|
|
@ -1419,7 +1413,7 @@ func parentSeqDiagram(n d2ir.Node) *d2ir.Map {
|
|||
}
|
||||
|
||||
func compileConfig(ir *d2ir.Map) (*d2target.Config, error) {
|
||||
f := ir.GetField("vars", "d2-config")
|
||||
f := ir.GetField(d2ast.FlatUnquotedString("vars"), d2ast.FlatUnquotedString("d2-config"))
|
||||
if f == nil || f.Map() == nil {
|
||||
return nil, nil
|
||||
}
|
||||
|
|
@ -1428,36 +1422,36 @@ func compileConfig(ir *d2ir.Map) (*d2target.Config, error) {
|
|||
|
||||
config := &d2target.Config{}
|
||||
|
||||
f = configMap.GetField("sketch")
|
||||
f = configMap.GetField(d2ast.FlatUnquotedString("sketch"))
|
||||
if f != nil {
|
||||
val, _ := strconv.ParseBool(f.Primary().Value.ScalarString())
|
||||
config.Sketch = &val
|
||||
}
|
||||
|
||||
f = configMap.GetField("theme-id")
|
||||
f = configMap.GetField(d2ast.FlatUnquotedString("theme-id"))
|
||||
if f != nil {
|
||||
val, _ := strconv.Atoi(f.Primary().Value.ScalarString())
|
||||
config.ThemeID = go2.Pointer(int64(val))
|
||||
}
|
||||
|
||||
f = configMap.GetField("dark-theme-id")
|
||||
f = configMap.GetField(d2ast.FlatUnquotedString("dark-theme-id"))
|
||||
if f != nil {
|
||||
val, _ := strconv.Atoi(f.Primary().Value.ScalarString())
|
||||
config.DarkThemeID = go2.Pointer(int64(val))
|
||||
}
|
||||
|
||||
f = configMap.GetField("pad")
|
||||
f = configMap.GetField(d2ast.FlatUnquotedString("pad"))
|
||||
if f != nil {
|
||||
val, _ := strconv.Atoi(f.Primary().Value.ScalarString())
|
||||
config.Pad = go2.Pointer(int64(val))
|
||||
}
|
||||
|
||||
f = configMap.GetField("layout-engine")
|
||||
f = configMap.GetField(d2ast.FlatUnquotedString("layout-engine"))
|
||||
if f != nil {
|
||||
config.LayoutEngine = go2.Pointer(f.Primary().Value.ScalarString())
|
||||
}
|
||||
|
||||
f = configMap.GetField("theme-overrides")
|
||||
f = configMap.GetField(d2ast.FlatUnquotedString("theme-overrides"))
|
||||
if f != nil {
|
||||
overrides, err := compileThemeOverrides(f.Map())
|
||||
if err != nil {
|
||||
|
|
@ -1465,7 +1459,7 @@ func compileConfig(ir *d2ir.Map) (*d2target.Config, error) {
|
|||
}
|
||||
config.ThemeOverrides = overrides
|
||||
}
|
||||
f = configMap.GetField("dark-theme-overrides")
|
||||
f = configMap.GetField(d2ast.FlatUnquotedString("dark-theme-overrides"))
|
||||
if f != nil {
|
||||
overrides, err := compileThemeOverrides(f.Map())
|
||||
if err != nil {
|
||||
|
|
@ -1473,12 +1467,12 @@ func compileConfig(ir *d2ir.Map) (*d2target.Config, error) {
|
|||
}
|
||||
config.DarkThemeOverrides = overrides
|
||||
}
|
||||
f = configMap.GetField("data")
|
||||
f = configMap.GetField(d2ast.FlatUnquotedString("data"))
|
||||
if f != nil && f.Map() != nil {
|
||||
config.Data = make(map[string]interface{})
|
||||
for _, f := range f.Map().Fields {
|
||||
if f.Primary() != nil {
|
||||
config.Data[f.Name] = f.Primary().Value.ScalarString()
|
||||
config.Data[f.Name.ScalarString()] = f.Primary().Value.ScalarString()
|
||||
} else if f.Composite != nil {
|
||||
var arr []interface{}
|
||||
switch c := f.Composite.(type) {
|
||||
|
|
@ -1490,7 +1484,7 @@ func compileConfig(ir *d2ir.Map) (*d2target.Config, error) {
|
|||
}
|
||||
}
|
||||
}
|
||||
config.Data[f.Name] = arr
|
||||
config.Data[f.Name.ScalarString()] = arr
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1507,7 +1501,7 @@ func compileThemeOverrides(m *d2ir.Map) (*d2target.ThemeOverrides, error) {
|
|||
err := &d2parser.ParseError{}
|
||||
FOR:
|
||||
for _, f := range m.Fields {
|
||||
switch strings.ToUpper(f.Name) {
|
||||
switch strings.ToUpper(f.Name.ScalarString()) {
|
||||
case "N1":
|
||||
themeOverrides.N1 = go2.Pointer(f.Primary().Value.ScalarString())
|
||||
case "N2":
|
||||
|
|
@ -1545,11 +1539,11 @@ FOR:
|
|||
case "AB5":
|
||||
themeOverrides.AB5 = go2.Pointer(f.Primary().Value.ScalarString())
|
||||
default:
|
||||
err.Errors = append(err.Errors, d2parser.Errorf(f.LastPrimaryKey(), fmt.Sprintf(`"%s" is not a valid theme code`, f.Name)).(d2ast.Error))
|
||||
err.Errors = append(err.Errors, d2parser.Errorf(f.LastPrimaryKey(), fmt.Sprintf(`"%s" is not a valid theme code`, f.Name.ScalarString())).(d2ast.Error))
|
||||
continue FOR
|
||||
}
|
||||
if !go2.Contains(color.NamedColors, strings.ToLower(f.Primary().Value.ScalarString())) && !color.ColorHexRegex.MatchString(f.Primary().Value.ScalarString()) {
|
||||
err.Errors = append(err.Errors, d2parser.Errorf(f.LastPrimaryKey(), fmt.Sprintf(`expected "%s" to be a valid named color ("orange") or a hex code ("#f0ff3a")`, f.Name)).(d2ast.Error))
|
||||
err.Errors = append(err.Errors, d2parser.Errorf(f.LastPrimaryKey(), fmt.Sprintf(`expected "%s" to be a valid named color ("orange") or a hex code ("#f0ff3a")`, f.Name.ScalarString())).(d2ast.Error))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1723,6 +1723,51 @@ y
|
|||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "reserved_quoted/1",
|
||||
text: `x: {
|
||||
"label": hello
|
||||
}
|
||||
`,
|
||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
assert.Equal(t, 2, len(g.Objects))
|
||||
assert.Equal(t, "x", g.Objects[0].Label.Value)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "reserved_quoted/2",
|
||||
text: `my_table: {
|
||||
shape: sql_table
|
||||
width: 200
|
||||
height: 200
|
||||
"shape": string
|
||||
"icon": string
|
||||
"width": int
|
||||
"height": int
|
||||
}
|
||||
`,
|
||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
assert.Equal(t, 4, len(g.Objects[0].SQLTable.Columns))
|
||||
assert.Equal(t, `shape`, g.Objects[0].SQLTable.Columns[0].Name.Label)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "reserved_quoted/3",
|
||||
text: `*."shape"
|
||||
x
|
||||
`,
|
||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
assert.Equal(t, 2, len(g.Objects))
|
||||
assert.Equal(t, `x.shape`, g.Objects[0].AbsID())
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "reserved_quoted/4",
|
||||
text: `x."style"."fill"`,
|
||||
assertions: func(t *testing.T, g *d2graph.Graph) {
|
||||
assert.Equal(t, 3, len(g.Objects))
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "errors/reserved_icon_style",
|
||||
|
||||
|
|
|
|||
|
|
@ -694,7 +694,10 @@ func (obj *Object) Text() *d2target.MText {
|
|||
}
|
||||
}
|
||||
|
||||
func (obj *Object) newObject(id string) *Object {
|
||||
func (obj *Object) newObject(ids d2ast.String) *Object {
|
||||
id := d2format.Format(&d2ast.KeyPath{
|
||||
Path: []*d2ast.StringBox{d2ast.MakeValueBox(d2ast.RawString(ids.ScalarString(), true)).StringBox()},
|
||||
})
|
||||
idval := id
|
||||
k, _ := d2parser.ParseKey(id)
|
||||
if k != nil && len(k.Path) > 0 {
|
||||
|
|
@ -847,7 +850,7 @@ func (obj *Object) FindEdges(mk *d2ast.Key) ([]*Edge, bool) {
|
|||
return ea, true
|
||||
}
|
||||
|
||||
func (obj *Object) ensureChildEdge(ida []string) *Object {
|
||||
func (obj *Object) ensureChildEdge(ida []d2ast.String) *Object {
|
||||
for i := range ida {
|
||||
switch obj.Shape.Value {
|
||||
case d2target.ShapeClass, d2target.ShapeSQLTable:
|
||||
|
|
@ -863,12 +866,12 @@ func (obj *Object) ensureChildEdge(ida []string) *Object {
|
|||
|
||||
// EnsureChild grabs the child by ids or creates it if it does not exist including all
|
||||
// intermediate nodes.
|
||||
func (obj *Object) EnsureChild(ida []string) *Object {
|
||||
func (obj *Object) EnsureChild(ida []d2ast.String) *Object {
|
||||
seq := obj.OuterSequenceDiagram()
|
||||
if seq != nil {
|
||||
for _, c := range seq.ChildrenArray {
|
||||
if c.ID == ida[0] {
|
||||
if obj.ID == ida[0] {
|
||||
if c.ID == ida[0].ScalarString() {
|
||||
if obj.ID == ida[0].ScalarString() {
|
||||
// In cases of a.a where EnsureChild is called on the parent a, the second a should
|
||||
// be created as a child of a and not as a child of the diagram. This is super
|
||||
// unfortunate code but alas.
|
||||
|
|
@ -884,9 +887,11 @@ func (obj *Object) EnsureChild(ida []string) *Object {
|
|||
return obj
|
||||
}
|
||||
|
||||
_, is := d2ast.ReservedKeywordHolders[ida[0]]
|
||||
_, is := d2ast.ReservedKeywordHolders[ida[0].ScalarString()]
|
||||
is = is && ida[0].IsUnquoted()
|
||||
if len(ida) == 1 && !is {
|
||||
_, ok := d2ast.ReservedKeywords[ida[0]]
|
||||
_, ok := d2ast.ReservedKeywords[ida[0].ScalarString()]
|
||||
ok = ok && ida[0].IsUnquoted()
|
||||
if ok {
|
||||
return obj
|
||||
}
|
||||
|
|
@ -895,11 +900,14 @@ func (obj *Object) EnsureChild(ida []string) *Object {
|
|||
id := ida[0]
|
||||
ida = ida[1:]
|
||||
|
||||
if id == "_" {
|
||||
if id.ScalarString() == "_" && id.IsUnquoted() {
|
||||
return obj.Parent.EnsureChild(ida)
|
||||
}
|
||||
|
||||
child, ok := obj.Children[strings.ToLower(id)]
|
||||
head := d2format.Format(&d2ast.KeyPath{
|
||||
Path: []*d2ast.StringBox{d2ast.MakeValueBox(d2ast.RawString(id.ScalarString(), true)).StringBox()},
|
||||
})
|
||||
child, ok := obj.Children[strings.ToLower(head)]
|
||||
if !ok {
|
||||
child = obj.newObject(id)
|
||||
}
|
||||
|
|
@ -1298,10 +1306,10 @@ func (e *Edge) AbsID() string {
|
|||
return fmt.Sprintf("%s(%s %s %s)[%d]", commonKey, strings.Join(srcIDA, "."), e.ArrowString(), strings.Join(dstIDA, "."), e.Index)
|
||||
}
|
||||
|
||||
func (obj *Object) Connect(srcID, dstID []string, srcArrow, dstArrow bool, label string) (*Edge, error) {
|
||||
for _, id := range [][]string{srcID, dstID} {
|
||||
func (obj *Object) Connect(srcID, dstID []d2ast.String, srcArrow, dstArrow bool, label string) (*Edge, error) {
|
||||
for _, id := range [][]d2ast.String{srcID, dstID} {
|
||||
for _, p := range id {
|
||||
if _, ok := d2ast.ReservedKeywords[p]; ok {
|
||||
if _, ok := d2ast.ReservedKeywords[p.ScalarString()]; ok && p.IsUnquoted() {
|
||||
return nil, errors.New("cannot connect to reserved keyword")
|
||||
}
|
||||
}
|
||||
|
|
@ -1329,7 +1337,7 @@ func (obj *Object) Connect(srcID, dstID []string, srcArrow, dstArrow bool, label
|
|||
return e, nil
|
||||
}
|
||||
|
||||
func addSQLTableColumnIndices(e *Edge, srcID, dstID []string, obj, src, dst *Object) {
|
||||
func addSQLTableColumnIndices(e *Edge, srcID, dstID []d2ast.String, obj, src, dst *Object) {
|
||||
if src.Shape.Value == d2target.ShapeSQLTable {
|
||||
if src == dst {
|
||||
// Ignore edge to column inside table.
|
||||
|
|
@ -1339,7 +1347,7 @@ func addSQLTableColumnIndices(e *Edge, srcID, dstID []string, obj, src, dst *Obj
|
|||
srcAbsID := src.AbsIDArray()
|
||||
if len(objAbsID)+len(srcID) > len(srcAbsID) {
|
||||
for i, d2col := range src.SQLTable.Columns {
|
||||
if d2col.Name.Label == srcID[len(srcID)-1] {
|
||||
if d2col.Name.Label == srcID[len(srcID)-1].ScalarString() {
|
||||
d2col.Reference = dst.AbsID()
|
||||
e.SrcTableColumnIndex = new(int)
|
||||
*e.SrcTableColumnIndex = i
|
||||
|
|
@ -1353,7 +1361,7 @@ func addSQLTableColumnIndices(e *Edge, srcID, dstID []string, obj, src, dst *Obj
|
|||
dstAbsID := dst.AbsIDArray()
|
||||
if len(objAbsID)+len(dstID) > len(dstAbsID) {
|
||||
for i, d2col := range dst.SQLTable.Columns {
|
||||
if d2col.Name.Label == dstID[len(dstID)-1] {
|
||||
if d2col.Name.Label == dstID[len(dstID)-1].ScalarString() {
|
||||
d2col.Reference = dst.AbsID()
|
||||
e.DstTableColumnIndex = new(int)
|
||||
*e.DstTableColumnIndex = i
|
||||
|
|
|
|||
|
|
@ -88,12 +88,12 @@ func Compile(ast *d2ast.Map, opts *CompileOptions) (*Map, []string, error) {
|
|||
}
|
||||
|
||||
func (c *compiler) overlayClasses(m *Map) {
|
||||
classes := m.GetField("classes")
|
||||
classes := m.GetField(d2ast.FlatUnquotedString("classes"))
|
||||
if classes == nil || classes.Map() == nil {
|
||||
return
|
||||
}
|
||||
|
||||
layersField := m.GetField("layers")
|
||||
layersField := m.GetField(d2ast.FlatUnquotedString("layers"))
|
||||
if layersField == nil {
|
||||
return
|
||||
}
|
||||
|
|
@ -108,7 +108,7 @@ func (c *compiler) overlayClasses(m *Map) {
|
|||
continue
|
||||
}
|
||||
l := lf.Map()
|
||||
lClasses := l.GetField("classes")
|
||||
lClasses := l.GetField(d2ast.FlatUnquotedString("classes"))
|
||||
|
||||
if lClasses == nil {
|
||||
lClasses = classes.Copy(l).(*Field)
|
||||
|
|
@ -126,7 +126,10 @@ func (c *compiler) overlayClasses(m *Map) {
|
|||
|
||||
func (c *compiler) compileSubstitutions(m *Map, varsStack []*Map) {
|
||||
for _, f := range m.Fields {
|
||||
if f.Name == "vars" && f.Map() != nil {
|
||||
if f.Name == nil {
|
||||
continue
|
||||
}
|
||||
if f.Name.ScalarString() == "vars" && f.Name.IsUnquoted() && f.Map() != nil {
|
||||
varsStack = append([]*Map{f.Map()}, varsStack...)
|
||||
}
|
||||
}
|
||||
|
|
@ -148,9 +151,9 @@ func (c *compiler) compileSubstitutions(m *Map, varsStack []*Map) {
|
|||
}
|
||||
}
|
||||
} else if f.Map() != nil {
|
||||
if f.Name == "vars" {
|
||||
if f.Name != nil && f.Name.ScalarString() == "vars" && f.Name.IsUnquoted() {
|
||||
c.compileSubstitutions(f.Map(), varsStack)
|
||||
c.validateConfigs(f.Map().GetField("d2-config"))
|
||||
c.validateConfigs(f.Map().GetField(d2ast.FlatUnquotedString("d2-config")))
|
||||
} else {
|
||||
c.compileSubstitutions(f.Map(), varsStack)
|
||||
}
|
||||
|
|
@ -172,37 +175,37 @@ func (c *compiler) validateConfigs(configs *Field) {
|
|||
}
|
||||
|
||||
if NodeBoardKind(ParentMap(ParentMap(configs))) == "" {
|
||||
c.errorf(configs.LastRef().AST(), `"%s" can only appear at root vars`, configs.Name)
|
||||
c.errorf(configs.LastRef().AST(), `"%s" can only appear at root vars`, configs.Name.ScalarString())
|
||||
return
|
||||
}
|
||||
|
||||
for _, f := range configs.Map().Fields {
|
||||
var val string
|
||||
if f.Primary() == nil {
|
||||
if f.Name != "theme-overrides" && f.Name != "dark-theme-overrides" && f.Name != "data" {
|
||||
c.errorf(f.LastRef().AST(), `"%s" needs a value`, f.Name)
|
||||
if f.Name.ScalarString() != "theme-overrides" && f.Name.ScalarString() != "dark-theme-overrides" && f.Name.ScalarString() != "data" {
|
||||
c.errorf(f.LastRef().AST(), `"%s" needs a value`, f.Name.ScalarString())
|
||||
continue
|
||||
}
|
||||
} else {
|
||||
val = f.Primary().Value.ScalarString()
|
||||
}
|
||||
|
||||
switch f.Name {
|
||||
switch f.Name.ScalarString() {
|
||||
case "sketch", "center":
|
||||
_, err := strconv.ParseBool(val)
|
||||
if err != nil {
|
||||
c.errorf(f.LastRef().AST(), `expected a boolean for "%s", got "%s"`, f.Name, val)
|
||||
c.errorf(f.LastRef().AST(), `expected a boolean for "%s", got "%s"`, f.Name.ScalarString(), val)
|
||||
continue
|
||||
}
|
||||
case "theme-overrides", "dark-theme-overrides", "data":
|
||||
if f.Map() == nil {
|
||||
c.errorf(f.LastRef().AST(), `"%s" needs a map`, f.Name)
|
||||
c.errorf(f.LastRef().AST(), `"%s" needs a map`, f.Name.ScalarString())
|
||||
continue
|
||||
}
|
||||
case "theme-id", "dark-theme-id":
|
||||
valInt, err := strconv.Atoi(val)
|
||||
if err != nil {
|
||||
c.errorf(f.LastRef().AST(), `expected an integer for "%s", got "%s"`, f.Name, val)
|
||||
c.errorf(f.LastRef().AST(), `expected an integer for "%s", got "%s"`, f.Name.ScalarString(), val)
|
||||
continue
|
||||
}
|
||||
if d2themescatalog.Find(int64(valInt)) == (d2themes.Theme{}) {
|
||||
|
|
@ -212,12 +215,12 @@ func (c *compiler) validateConfigs(configs *Field) {
|
|||
case "pad":
|
||||
_, err := strconv.Atoi(val)
|
||||
if err != nil {
|
||||
c.errorf(f.LastRef().AST(), `expected an integer for "%s", got "%s"`, f.Name, val)
|
||||
c.errorf(f.LastRef().AST(), `expected an integer for "%s", got "%s"`, f.Name.ScalarString(), val)
|
||||
continue
|
||||
}
|
||||
case "layout-engine":
|
||||
default:
|
||||
c.errorf(f.LastRef().AST(), `"%s" is not a valid config`, f.Name)
|
||||
c.errorf(f.LastRef().AST(), `"%s" is not a valid config`, f.Name.ScalarString())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -362,7 +365,7 @@ func (c *compiler) collectVariables(vars *Map, variables map[string]string) {
|
|||
}
|
||||
for _, f := range vars.Fields {
|
||||
if f.Primary() != nil {
|
||||
variables[f.Name] = f.Primary().Value.ScalarString()
|
||||
variables[f.Name.ScalarString()] = f.Primary().Value.ScalarString()
|
||||
} else if f.Map() != nil {
|
||||
c.collectVariables(f.Map(), variables)
|
||||
}
|
||||
|
|
@ -378,7 +381,7 @@ func (c *compiler) resolveSubstitution(vars *Map, node Node, substitution *d2ast
|
|||
parent := ParentField(node)
|
||||
|
||||
for i, p := range substitution.Path {
|
||||
f := vars.GetField(p.Unbox().ScalarString())
|
||||
f := vars.GetField(p.Unbox())
|
||||
if f == nil {
|
||||
return nil
|
||||
}
|
||||
|
|
@ -398,7 +401,7 @@ func (c *compiler) resolveSubstitution(vars *Map, node Node, substitution *d2ast
|
|||
//
|
||||
// When resolving hi.vars.x, the vars stack includes itself.
|
||||
// So this next if clause says, "ignore if we're using the current scope's vars to try to resolve a substitution that requires a var from further in the stack"
|
||||
if fok && fieldNode.Name == p.Unbox().ScalarString() && isCurrentScopeVars && parent.Name == "vars" {
|
||||
if fok && fieldNode.Name != nil && fieldNode.Name.ScalarString() == p.Unbox().ScalarString() && isCurrentScopeVars && parent.Name.ScalarString() == "vars" && parent.Name.IsUnquoted() {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -442,7 +445,7 @@ func (g *globContext) copyApplied(from *globContext) {
|
|||
|
||||
func (g *globContext) prefixed(dst *Map) *globContext {
|
||||
g2 := g.copy()
|
||||
prefix := d2ast.MakeKeyPath(RelIDA(g2.refctx.ScopeMap, dst))
|
||||
prefix := d2ast.MakeKeyPathString(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...)
|
||||
|
|
@ -480,9 +483,9 @@ func (c *compiler) ampersandFilterMap(dst *Map, ast, scopeAST *d2ast.Map) bool {
|
|||
}
|
||||
var ks string
|
||||
if gctx.refctx.Key.HasMultiGlob() {
|
||||
ks = d2format.Format(d2ast.MakeKeyPath(IDA(dst)))
|
||||
ks = d2format.Format(d2ast.MakeKeyPathString(IDA(dst)))
|
||||
} else {
|
||||
ks = d2format.Format(d2ast.MakeKeyPath(BoardIDA(dst)))
|
||||
ks = d2format.Format(d2ast.MakeKeyPathString(BoardIDA(dst)))
|
||||
}
|
||||
delete(gctx.appliedFields, ks)
|
||||
delete(gctx.appliedEdges, ks)
|
||||
|
|
@ -758,7 +761,7 @@ func (c *compiler) ampersandFilter(refctx *RefContext) bool {
|
|||
case *Field:
|
||||
// The label value for fields is their key value
|
||||
f.Primary_ = &Scalar{
|
||||
Value: d2ast.FlatUnquotedString(n.Name),
|
||||
Value: n.Name,
|
||||
}
|
||||
case *Edge:
|
||||
// But for edges, it's nothing
|
||||
|
|
@ -834,7 +837,7 @@ func (c *compiler) _compileField(f *Field, refctx *RefContext) {
|
|||
// For vars, if we delete the field, it may just resolve to an outer scope var of the same name
|
||||
// Instead we keep it around, so that resolveSubstitutions can find it
|
||||
if !IsVar(ParentMap(f)) {
|
||||
ParentMap(f).DeleteField(f.Name)
|
||||
ParentMap(f).DeleteField(f.Name.ScalarString())
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
@ -943,7 +946,7 @@ func (c *compiler) _compileField(f *Field, refctx *RefContext) {
|
|||
Value: refctx.Key.Value.ScalarBox().Unbox(),
|
||||
}
|
||||
// If the link is a board, we need to transform it into an absolute path.
|
||||
if f.Name == "link" {
|
||||
if f.Name.ScalarString() == "link" && f.Name.IsUnquoted() {
|
||||
c.compileLink(f, refctx)
|
||||
}
|
||||
}
|
||||
|
|
@ -966,7 +969,7 @@ func (c *compiler) extendLinks(m *Map, importF *Field, importDir string) {
|
|||
nodeBoardKind := NodeBoardKind(m)
|
||||
importIDA := IDA(importF)
|
||||
for _, f := range m.Fields {
|
||||
if f.Name == "link" {
|
||||
if f.Name.ScalarString() == "link" && f.Name.IsUnquoted() {
|
||||
if nodeBoardKind != "" {
|
||||
c.errorf(f.LastRef().AST(), "a board itself cannot be linked; only objects within a board can be linked")
|
||||
continue
|
||||
|
|
@ -989,11 +992,11 @@ func (c *compiler) extendLinks(m *Map, importF *Field, importDir string) {
|
|||
}
|
||||
|
||||
for _, id := range linkIDA[1:] {
|
||||
if id == "_" {
|
||||
if id.ScalarString() == "_" && id.IsUnquoted() {
|
||||
if len(linkIDA) < 2 || len(importIDA) < 2 {
|
||||
break
|
||||
}
|
||||
linkIDA = append([]string{linkIDA[0]}, linkIDA[2:]...)
|
||||
linkIDA = append([]d2ast.String{linkIDA[0]}, linkIDA[2:]...)
|
||||
importIDA = importIDA[:len(importIDA)-2]
|
||||
} else {
|
||||
break
|
||||
|
|
@ -1001,11 +1004,11 @@ func (c *compiler) extendLinks(m *Map, importF *Field, importDir string) {
|
|||
}
|
||||
|
||||
extendedIDA := append(importIDA, linkIDA[1:]...)
|
||||
kp := d2ast.MakeKeyPath(extendedIDA)
|
||||
kp := d2ast.MakeKeyPathString(extendedIDA)
|
||||
s := d2format.Format(kp)
|
||||
f.Primary_.Value = d2ast.MakeValueBox(d2ast.FlatUnquotedString(s)).ScalarBox().Unbox()
|
||||
}
|
||||
if f.Name == "icon" && f.Primary() != nil {
|
||||
if f.Name.ScalarString() == "icon" && f.Name.IsUnquoted() && f.Primary() != nil {
|
||||
val := f.Primary().Value.ScalarString()
|
||||
// It's likely a substitution
|
||||
if val == "" {
|
||||
|
|
@ -1043,30 +1046,34 @@ func (c *compiler) compileLink(f *Field, refctx *RefContext) {
|
|||
return
|
||||
}
|
||||
|
||||
if linkIDA[0] == "root" {
|
||||
if linkIDA[0].ScalarString() == "root" && linkIDA[0].IsUnquoted() {
|
||||
c.errorf(refctx.Key.Key, "cannot refer to root in link")
|
||||
return
|
||||
}
|
||||
|
||||
if !linkIDA[0].IsUnquoted() {
|
||||
return
|
||||
}
|
||||
|
||||
// If it doesn't start with one of these reserved words, the link is definitely not a board link.
|
||||
if !strings.EqualFold(linkIDA[0], "layers") && !strings.EqualFold(linkIDA[0], "scenarios") && !strings.EqualFold(linkIDA[0], "steps") && linkIDA[0] != "_" {
|
||||
if !strings.EqualFold(linkIDA[0].ScalarString(), "layers") && !strings.EqualFold(linkIDA[0].ScalarString(), "scenarios") && !strings.EqualFold(linkIDA[0].ScalarString(), "steps") && linkIDA[0].ScalarString() != "_" {
|
||||
return
|
||||
}
|
||||
|
||||
// Chop off the non-board portion of the scope, like if this is being defined on a nested object (e.g. `x.y.z`)
|
||||
for i := len(scopeIDA) - 1; i > 0; i-- {
|
||||
if strings.EqualFold(scopeIDA[i-1], "layers") || strings.EqualFold(scopeIDA[i-1], "scenarios") || strings.EqualFold(scopeIDA[i-1], "steps") {
|
||||
if scopeIDA[i-1].IsUnquoted() && (strings.EqualFold(scopeIDA[i-1].ScalarString(), "layers") || strings.EqualFold(scopeIDA[i-1].ScalarString(), "scenarios") || strings.EqualFold(scopeIDA[i-1].ScalarString(), "steps")) {
|
||||
scopeIDA = scopeIDA[:i+1]
|
||||
break
|
||||
}
|
||||
if scopeIDA[i-1] == "root" {
|
||||
if scopeIDA[i-1].ScalarString() == "root" && scopeIDA[i-1].IsUnquoted() {
|
||||
scopeIDA = scopeIDA[:i]
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// Resolve underscores
|
||||
for len(linkIDA) > 0 && linkIDA[0] == "_" {
|
||||
for len(linkIDA) > 0 && linkIDA[0].ScalarString() == "_" && linkIDA[0].IsUnquoted() {
|
||||
if len(scopeIDA) < 2 {
|
||||
// Leave the underscore. It will fail in compiler as a standalone board,
|
||||
// but if imported, will get further resolved in extendLinks
|
||||
|
|
@ -1077,12 +1084,12 @@ func (c *compiler) compileLink(f *Field, refctx *RefContext) {
|
|||
linkIDA = linkIDA[1:]
|
||||
}
|
||||
if len(scopeIDA) == 0 {
|
||||
scopeIDA = []string{"root"}
|
||||
scopeIDA = []d2ast.String{d2ast.FlatUnquotedString("root")}
|
||||
}
|
||||
|
||||
// Create the absolute path by appending scope path with value specified
|
||||
scopeIDA = append(scopeIDA, linkIDA...)
|
||||
kp := d2ast.MakeKeyPath(scopeIDA)
|
||||
kp := d2ast.MakeKeyPathString(scopeIDA)
|
||||
f.Primary_.Value = d2ast.FlatUnquotedString(d2format.Format(kp))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -195,6 +195,23 @@ func testCompileFields(t *testing.T) {
|
|||
assert.String(t, `[1; 2; 3; 4]`, f.Composite.String())
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "quoted",
|
||||
run: func(t testing.TB) {
|
||||
m, err := compile(t, `my_table: {
|
||||
shape: sql_table
|
||||
width: 200
|
||||
height: 200
|
||||
"shape": string
|
||||
"icon": string
|
||||
"width": int
|
||||
"height": int
|
||||
}`)
|
||||
assert.Success(t, err)
|
||||
assertQuery(t, m, 0, 0, "sql_table", "my_table.shape")
|
||||
assertQuery(t, m, 0, 0, "string", `my_table."shape"`)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "null",
|
||||
run: func(t testing.TB) {
|
||||
|
|
@ -722,7 +739,7 @@ dora: {
|
|||
}
|
||||
`)
|
||||
assert.Success(t, err)
|
||||
assert.Equal(t, "grid-columns", m.Fields[1].Map().Fields[0].Name)
|
||||
assert.Equal(t, "grid-columns", m.Fields[1].Map().Fields[0].Name.ScalarString())
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
185
d2ir/d2ir.go
|
|
@ -176,7 +176,7 @@ type Map struct {
|
|||
|
||||
func (m *Map) initRoot() {
|
||||
m.parent = &Field{
|
||||
Name: "root",
|
||||
Name: d2ast.FlatUnquotedString("root"),
|
||||
References: []*FieldReference{{
|
||||
Context_: &RefContext{
|
||||
ScopeMap: m,
|
||||
|
|
@ -293,7 +293,7 @@ func NodeBoardKind(n Node) BoardKind {
|
|||
if f == nil {
|
||||
return ""
|
||||
}
|
||||
switch f.Name {
|
||||
switch f.Name.ScalarString() {
|
||||
case "layers":
|
||||
return BoardLayer
|
||||
case "scenarios":
|
||||
|
|
@ -319,7 +319,7 @@ type Field struct {
|
|||
parent Node
|
||||
importAST d2ast.Node
|
||||
|
||||
Name string `json:"name"`
|
||||
Name d2ast.String `json:"name"`
|
||||
|
||||
// Primary_ to avoid clashing with Primary(). We need to keep it exported for
|
||||
// encoding/json to marshal it so cannot prefix _ instead.
|
||||
|
|
@ -377,11 +377,11 @@ func (f *Field) LastRef() Reference {
|
|||
}
|
||||
|
||||
type EdgeID struct {
|
||||
SrcPath []string `json:"src_path"`
|
||||
SrcArrow bool `json:"src_arrow"`
|
||||
SrcPath []d2ast.String `json:"src_path"`
|
||||
SrcArrow bool `json:"src_arrow"`
|
||||
|
||||
DstPath []string `json:"dst_path"`
|
||||
DstArrow bool `json:"dst_arrow"`
|
||||
DstPath []d2ast.String `json:"dst_path"`
|
||||
DstArrow bool `json:"dst_arrow"`
|
||||
|
||||
// If nil, then any EdgeID with equal src/dst/arrows matches.
|
||||
Index *int `json:"index"`
|
||||
|
|
@ -409,8 +409,8 @@ func (eid *EdgeID) Copy() *EdgeID {
|
|||
tmp := *eid
|
||||
eid = &tmp
|
||||
|
||||
eid.SrcPath = append([]string(nil), eid.SrcPath...)
|
||||
eid.DstPath = append([]string(nil), eid.DstPath...)
|
||||
eid.SrcPath = append([]d2ast.String(nil), eid.SrcPath...)
|
||||
eid.DstPath = append([]d2ast.String(nil), eid.DstPath...)
|
||||
return eid
|
||||
}
|
||||
|
||||
|
|
@ -428,7 +428,7 @@ func (eid *EdgeID) Match(eid2 *EdgeID) bool {
|
|||
return false
|
||||
}
|
||||
for i, s := range eid.SrcPath {
|
||||
if !strings.EqualFold(s, eid2.SrcPath[i]) {
|
||||
if !strings.EqualFold(s.ScalarString(), eid2.SrcPath[i].ScalarString()) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
@ -440,7 +440,7 @@ func (eid *EdgeID) Match(eid2 *EdgeID) bool {
|
|||
return false
|
||||
}
|
||||
for i, s := range eid.DstPath {
|
||||
if !strings.EqualFold(s, eid2.DstPath[i]) {
|
||||
if !strings.EqualFold(s.ScalarString(), eid2.DstPath[i].ScalarString()) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
@ -450,21 +450,21 @@ func (eid *EdgeID) Match(eid2 *EdgeID) bool {
|
|||
|
||||
// resolve resolves both underscores and commons in eid.
|
||||
// It returns the new eid, containing map adjusted for underscores and common ida.
|
||||
func (eid *EdgeID) resolve(m *Map) (_ *EdgeID, _ *Map, common []string, _ error) {
|
||||
func (eid *EdgeID) resolve(m *Map) (_ *EdgeID, _ *Map, common []d2ast.String, _ error) {
|
||||
eid = eid.Copy()
|
||||
maxUnderscores := go2.Max(countUnderscores(eid.SrcPath), countUnderscores(eid.DstPath))
|
||||
for i := 0; i < maxUnderscores; i++ {
|
||||
if eid.SrcPath[0] == "_" {
|
||||
if eid.SrcPath[0].ScalarString() == "_" && eid.SrcPath[0].IsUnquoted() {
|
||||
eid.SrcPath = eid.SrcPath[1:]
|
||||
} else {
|
||||
mf := ParentField(m)
|
||||
eid.SrcPath = append([]string{mf.Name}, eid.SrcPath...)
|
||||
eid.SrcPath = append([]d2ast.String{mf.Name}, eid.SrcPath...)
|
||||
}
|
||||
if eid.DstPath[0] == "_" {
|
||||
if eid.DstPath[0].ScalarString() == "_" && eid.DstPath[0].IsUnquoted() {
|
||||
eid.DstPath = eid.DstPath[1:]
|
||||
} else {
|
||||
mf := ParentField(m)
|
||||
eid.DstPath = append([]string{mf.Name}, eid.DstPath...)
|
||||
eid.DstPath = append([]d2ast.String{mf.Name}, eid.DstPath...)
|
||||
}
|
||||
m = ParentMap(m)
|
||||
if m == nil {
|
||||
|
|
@ -473,7 +473,7 @@ func (eid *EdgeID) resolve(m *Map) (_ *EdgeID, _ *Map, common []string, _ error)
|
|||
}
|
||||
|
||||
for len(eid.SrcPath) > 1 && len(eid.DstPath) > 1 {
|
||||
if !strings.EqualFold(eid.SrcPath[0], eid.DstPath[0]) || strings.Contains(eid.SrcPath[0], "*") {
|
||||
if !strings.EqualFold(eid.SrcPath[0].ScalarString(), eid.DstPath[0].ScalarString()) || strings.Contains(eid.SrcPath[0].ScalarString(), "*") {
|
||||
return eid, m, common, nil
|
||||
}
|
||||
common = append(common, eid.SrcPath[0])
|
||||
|
|
@ -674,8 +674,8 @@ func (m *Map) IsContainer() bool {
|
|||
return false
|
||||
}
|
||||
for _, f := range m.Fields {
|
||||
_, isReserved := d2ast.ReservedKeywords[f.Name]
|
||||
if !isReserved {
|
||||
_, isReserved := d2ast.ReservedKeywords[f.Name.ScalarString()]
|
||||
if !(isReserved && f.Name.IsUnquoted()) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
@ -702,9 +702,9 @@ func (m *Map) EdgeCountRecursive() int {
|
|||
|
||||
func (m *Map) GetClassMap(name string) *Map {
|
||||
root := RootMap(m)
|
||||
classes := root.Map().GetField("classes")
|
||||
classes := root.Map().GetField(d2ast.FlatUnquotedString("classes"))
|
||||
if classes != nil && classes.Map() != nil {
|
||||
class := classes.Map().GetField(name)
|
||||
class := classes.Map().GetField(d2ast.FlatUnquotedString(name))
|
||||
if class != nil && class.Map() != nil {
|
||||
return class.Map()
|
||||
}
|
||||
|
|
@ -712,8 +712,8 @@ func (m *Map) GetClassMap(name string) *Map {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *Map) GetField(ida ...string) *Field {
|
||||
for len(ida) > 0 && ida[0] == "_" {
|
||||
func (m *Map) GetField(ida ...d2ast.String) *Field {
|
||||
for len(ida) > 0 && ida[0].ScalarString() == "_" && ida[0].IsUnquoted() {
|
||||
m = ParentMap(m)
|
||||
if m == nil {
|
||||
return nil
|
||||
|
|
@ -722,7 +722,7 @@ func (m *Map) GetField(ida ...string) *Field {
|
|||
return m.getField(ida)
|
||||
}
|
||||
|
||||
func (m *Map) getField(ida []string) *Field {
|
||||
func (m *Map) getField(ida []d2ast.String) *Field {
|
||||
if len(ida) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
|
@ -730,12 +730,18 @@ func (m *Map) getField(ida []string) *Field {
|
|||
s := ida[0]
|
||||
rest := ida[1:]
|
||||
|
||||
if s == "_" {
|
||||
if s.ScalarString() == "_" && s.IsUnquoted() {
|
||||
return nil
|
||||
}
|
||||
|
||||
for _, f := range m.Fields {
|
||||
if !strings.EqualFold(f.Name, s) {
|
||||
if f.Name == nil {
|
||||
continue
|
||||
}
|
||||
if !strings.EqualFold(f.Name.ScalarString(), s.ScalarString()) {
|
||||
continue
|
||||
}
|
||||
if f.Name.IsUnquoted() != s.IsUnquoted() {
|
||||
continue
|
||||
}
|
||||
if len(rest) == 0 {
|
||||
|
|
@ -751,7 +757,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, c *compiler) ([]*Field, error) {
|
||||
i := 0
|
||||
for kp.Path[i].Unbox().ScalarString() == "_" {
|
||||
for kp.Path[i].Unbox().ScalarString() == "_" && kp.Path[i].Unbox().IsUnquoted() {
|
||||
m = ParentMap(m)
|
||||
if m == nil {
|
||||
return nil, d2parser.Errorf(kp.Path[i].Unbox(), "invalid underscore: no parent")
|
||||
|
|
@ -785,9 +791,9 @@ func (m *Map) ensureField(i int, kp *d2ast.KeyPath, refctx *RefContext, create b
|
|||
if gctx != nil {
|
||||
var ks string
|
||||
if refctx.Key.HasMultiGlob() {
|
||||
ks = d2format.Format(d2ast.MakeKeyPath(IDA(f)))
|
||||
ks = d2format.Format(d2ast.MakeKeyPathString(IDA(f)))
|
||||
} else {
|
||||
ks = d2format.Format(d2ast.MakeKeyPath(BoardIDA(f)))
|
||||
ks = d2format.Format(d2ast.MakeKeyPathString(BoardIDA(f)))
|
||||
}
|
||||
if !kp.HasGlob() {
|
||||
if !passthrough {
|
||||
|
|
@ -841,7 +847,10 @@ func (m *Map) ensureField(i int, kp *d2ast.KeyPath, refctx *RefContext, create b
|
|||
return nil
|
||||
}
|
||||
for _, f := range m.Fields {
|
||||
if matchPattern(f.Name, us.Pattern) {
|
||||
if f.Name == nil {
|
||||
continue
|
||||
}
|
||||
if matchPattern(f.Name.ScalarString(), us.Pattern) {
|
||||
if i == len(kp.Path)-1 {
|
||||
faAppend(f)
|
||||
} else {
|
||||
|
|
@ -863,29 +872,30 @@ func (m *Map) ensureField(i int, kp *d2ast.KeyPath, refctx *RefContext, create b
|
|||
return nil
|
||||
}
|
||||
|
||||
head := kp.Path[i].Unbox().ScalarString()
|
||||
head := kp.Path[i].Unbox()
|
||||
headString := head.ScalarString()
|
||||
|
||||
if _, ok := d2ast.ReservedKeywords[strings.ToLower(head)]; ok {
|
||||
head = strings.ToLower(head)
|
||||
if _, ok := d2ast.CompositeReservedKeywords[head]; !ok && i < len(kp.Path)-1 {
|
||||
return d2parser.Errorf(kp.Path[i].Unbox(), fmt.Sprintf(`"%s" must be the last part of the key`, head))
|
||||
if _, ok := d2ast.ReservedKeywords[strings.ToLower(head.ScalarString())]; ok && head.IsUnquoted() {
|
||||
headString = strings.ToLower(head.ScalarString())
|
||||
if _, ok := d2ast.CompositeReservedKeywords[headString]; !ok && i < len(kp.Path)-1 {
|
||||
return d2parser.Errorf(kp.Path[i].Unbox(), fmt.Sprintf(`"%s" must be the last part of the key`, headString))
|
||||
}
|
||||
}
|
||||
|
||||
if head == "_" {
|
||||
if headString == "_" && head.IsUnquoted() {
|
||||
return d2parser.Errorf(kp.Path[i].Unbox(), `parent "_" can only be used in the beginning of paths, e.g. "_.x"`)
|
||||
}
|
||||
|
||||
if head == "classes" && NodeBoardKind(m) == "" {
|
||||
return d2parser.Errorf(kp.Path[i].Unbox(), "%s is only allowed at a board root", head)
|
||||
if headString == "classes" && head.IsUnquoted() && NodeBoardKind(m) == "" {
|
||||
return d2parser.Errorf(kp.Path[i].Unbox(), "%s is only allowed at a board root", headString)
|
||||
}
|
||||
|
||||
if findBoardKeyword(head) != -1 && NodeBoardKind(m) == "" {
|
||||
return d2parser.Errorf(kp.Path[i].Unbox(), "%s is only allowed at a board root", head)
|
||||
if findBoardKeyword(head) != -1 && head.IsUnquoted() && NodeBoardKind(m) == "" {
|
||||
return d2parser.Errorf(kp.Path[i].Unbox(), "%s is only allowed at a board root", headString)
|
||||
}
|
||||
|
||||
for _, f := range m.Fields {
|
||||
if !strings.EqualFold(f.Name, head) {
|
||||
if !(f.Name != nil && strings.EqualFold(f.Name.ScalarString(), head.ScalarString()) && f.Name.IsUnquoted() == head.IsUnquoted()) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
@ -922,14 +932,14 @@ func (m *Map) ensureField(i int, kp *d2ast.KeyPath, refctx *RefContext, create b
|
|||
return nil
|
||||
}
|
||||
shape := ParentShape(m)
|
||||
if _, ok := d2ast.ReservedKeywords[strings.ToLower(head)]; !ok && len(c.globRefContextStack) > 0 {
|
||||
if _, ok := d2ast.ReservedKeywords[strings.ToLower(head.ScalarString())]; !(ok && head.IsUnquoted()) && len(c.globRefContextStack) > 0 {
|
||||
if shape == d2target.ShapeClass || shape == d2target.ShapeSQLTable {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
f := &Field{
|
||||
parent: m,
|
||||
Name: head,
|
||||
Name: kp.Path[i].Unbox(),
|
||||
}
|
||||
defer func() {
|
||||
if i < kp.FirstGlob() {
|
||||
|
|
@ -938,9 +948,9 @@ func (m *Map) ensureField(i int, kp *d2ast.KeyPath, refctx *RefContext, create b
|
|||
for _, grefctx := range c.globRefContextStack {
|
||||
var ks string
|
||||
if grefctx.Key.HasMultiGlob() {
|
||||
ks = d2format.Format(d2ast.MakeKeyPath(IDA(f)))
|
||||
ks = d2format.Format(d2ast.MakeKeyPathString(IDA(f)))
|
||||
} else {
|
||||
ks = d2format.Format(d2ast.MakeKeyPath(BoardIDA(f)))
|
||||
ks = d2format.Format(d2ast.MakeKeyPathString(BoardIDA(f)))
|
||||
}
|
||||
gctx2 := c.getGlobContext(grefctx)
|
||||
gctx2.appliedFields[ks] = struct{}{}
|
||||
|
|
@ -995,7 +1005,7 @@ func (m *Map) DeleteField(ida ...string) *Field {
|
|||
rest := ida[1:]
|
||||
|
||||
for i, f := range m.Fields {
|
||||
if !strings.EqualFold(f.Name, s) {
|
||||
if !strings.EqualFold(f.Name.ScalarString(), s) {
|
||||
continue
|
||||
}
|
||||
if len(rest) == 0 {
|
||||
|
|
@ -1022,10 +1032,10 @@ func (m *Map) DeleteField(ida ...string) *Field {
|
|||
// then that holder becomes meaningless and should be deleted too
|
||||
parent := ParentField(f)
|
||||
for keywordHolder := range d2ast.ReservedKeywordHolders {
|
||||
if parent != nil && parent.Name == keywordHolder && len(parent.Map().Fields) == 0 {
|
||||
if parent != nil && parent.Name.ScalarString() == keywordHolder && parent.Name.IsUnquoted() && len(parent.Map().Fields) == 0 {
|
||||
keywordHolderParentMap := ParentMap(parent)
|
||||
for i, f := range keywordHolderParentMap.Fields {
|
||||
if f.Name == keywordHolder {
|
||||
if f.Name.ScalarString() == keywordHolder && f.Name.IsUnquoted() {
|
||||
keywordHolderParentMap.Fields = append(keywordHolderParentMap.Fields[:i], keywordHolderParentMap.Fields[i+1:]...)
|
||||
break
|
||||
}
|
||||
|
|
@ -1083,7 +1093,7 @@ func (m *Map) getEdges(eid *EdgeID, refctx *RefContext, gctx *globContext, ea *[
|
|||
}
|
||||
|
||||
if len(common) > 0 {
|
||||
commonKP := d2ast.MakeKeyPath(common)
|
||||
commonKP := d2ast.MakeKeyPathString(common)
|
||||
lastMatch := 0
|
||||
for i, el := range commonKP.Path {
|
||||
for j := lastMatch; j < len(refctx.Edge.Src.Path); j++ {
|
||||
|
|
@ -1135,9 +1145,9 @@ func (m *Map) getEdges(eid *EdgeID, refctx *RefContext, gctx *globContext, ea *[
|
|||
if gctx != nil {
|
||||
var ks string
|
||||
if refctx.Key.HasMultiGlob() {
|
||||
ks = d2format.Format(d2ast.MakeKeyPath(IDA(e)))
|
||||
ks = d2format.Format(d2ast.MakeKeyPathString(IDA(e)))
|
||||
} else {
|
||||
ks = d2format.Format(d2ast.MakeKeyPath(BoardIDA(e)))
|
||||
ks = d2format.Format(d2ast.MakeKeyPathString(BoardIDA(e)))
|
||||
}
|
||||
if _, ok := gctx.appliedEdges[ks]; ok {
|
||||
continue
|
||||
|
|
@ -1179,7 +1189,7 @@ func (m *Map) createEdge(eid *EdgeID, refctx *RefContext, gctx *globContext, c *
|
|||
return d2parser.Errorf(refctx.Edge, err.Error())
|
||||
}
|
||||
if len(common) > 0 {
|
||||
commonKP := d2ast.MakeKeyPath(common)
|
||||
commonKP := d2ast.MakeKeyPathString(common)
|
||||
lastMatch := 0
|
||||
for i, el := range commonKP.Path {
|
||||
for j := lastMatch; j < len(refctx.Edge.Src.Path); j++ {
|
||||
|
|
@ -1296,7 +1306,7 @@ func (m *Map) createEdge2(eid *EdgeID, refctx *RefContext, gctx *globContext, c
|
|||
return nil, d2parser.Errorf(refctx.Edge, err.Error())
|
||||
}
|
||||
if len(common) > 0 {
|
||||
commonKP := d2ast.MakeKeyPath(common)
|
||||
commonKP := d2ast.MakeKeyPathString(common)
|
||||
lastMatch := 0
|
||||
for i, el := range commonKP.Path {
|
||||
for j := lastMatch; j < len(refctx.Edge.Src.Path); j++ {
|
||||
|
|
@ -1353,9 +1363,9 @@ func (m *Map) createEdge2(eid *EdgeID, refctx *RefContext, gctx *globContext, c
|
|||
e2.ID = e2.ID.Copy()
|
||||
e2.ID.Index = nil
|
||||
if refctx.Key.HasMultiGlob() {
|
||||
ks = d2format.Format(d2ast.MakeKeyPath(IDA(e2)))
|
||||
ks = d2format.Format(d2ast.MakeKeyPathString(IDA(e2)))
|
||||
} else {
|
||||
ks = d2format.Format(d2ast.MakeKeyPath(BoardIDA(e2)))
|
||||
ks = d2format.Format(d2ast.MakeKeyPathString(BoardIDA(e2)))
|
||||
}
|
||||
if _, ok := gctx.appliedEdges[ks]; ok {
|
||||
return nil, nil
|
||||
|
|
@ -1376,7 +1386,7 @@ func (f *Field) AST() d2ast.Node {
|
|||
k := &d2ast.Key{
|
||||
Key: &d2ast.KeyPath{
|
||||
Path: []*d2ast.StringBox{
|
||||
d2ast.MakeValueBox(d2ast.RawString(f.Name, true)).StringBox(),
|
||||
d2ast.MakeValueBox(f.Name).StringBox(),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1394,11 +1404,11 @@ func (f *Field) AST() d2ast.Node {
|
|||
func (e *Edge) AST() d2ast.Node {
|
||||
astEdge := &d2ast.Edge{}
|
||||
|
||||
astEdge.Src = d2ast.MakeKeyPath(e.ID.SrcPath)
|
||||
astEdge.Src = d2ast.MakeKeyPathString(e.ID.SrcPath)
|
||||
if e.ID.SrcArrow {
|
||||
astEdge.SrcArrow = "<"
|
||||
}
|
||||
astEdge.Dst = d2ast.MakeKeyPath(e.ID.DstPath)
|
||||
astEdge.Dst = d2ast.MakeKeyPathString(e.ID.DstPath)
|
||||
if e.ID.DstArrow {
|
||||
astEdge.DstArrow = ">"
|
||||
}
|
||||
|
|
@ -1417,7 +1427,7 @@ func (e *Edge) AST() d2ast.Node {
|
|||
return k
|
||||
}
|
||||
|
||||
func (e *Edge) IDString() string {
|
||||
func (e *Edge) IDString() d2ast.String {
|
||||
ast := e.AST().(*d2ast.Key)
|
||||
if e.ID.Index != nil {
|
||||
ast.EdgeIndex = &d2ast.EdgeIndex{
|
||||
|
|
@ -1426,7 +1436,8 @@ func (e *Edge) IDString() string {
|
|||
}
|
||||
ast.Primary = d2ast.ScalarBox{}
|
||||
ast.Value = d2ast.ValueBox{}
|
||||
return d2format.Format(ast)
|
||||
formatted := d2format.Format(ast)
|
||||
return d2ast.FlatUnquotedString(formatted)
|
||||
}
|
||||
|
||||
func (a *Array) AST() d2ast.Node {
|
||||
|
|
@ -1458,7 +1469,7 @@ func (m *Map) AST() d2ast.Node {
|
|||
|
||||
func (m *Map) appendFieldReferences(i int, kp *d2ast.KeyPath, refctx *RefContext, c *compiler) {
|
||||
sb := kp.Path[i]
|
||||
f := m.GetField(sb.Unbox().ScalarString())
|
||||
f := m.GetField(sb.Unbox())
|
||||
if f == nil {
|
||||
return
|
||||
}
|
||||
|
|
@ -1517,7 +1528,7 @@ func IsVar(n Node) bool {
|
|||
if NodeBoardKind(n) != "" {
|
||||
return false
|
||||
}
|
||||
if f, ok := n.(*Field); ok && f.Name == "vars" {
|
||||
if f, ok := n.(*Field); ok && f.Name.ScalarString() == "vars" && f.Name.IsUnquoted() {
|
||||
return true
|
||||
}
|
||||
if n == (*Map)(nil) {
|
||||
|
|
@ -1556,7 +1567,7 @@ func ParentShape(n Node) string {
|
|||
f, ok := n.(*Field)
|
||||
if ok {
|
||||
if f.Map() != nil {
|
||||
shapef := f.Map().GetField("shape")
|
||||
shapef := f.Map().GetField(d2ast.FlatUnquotedString("shape"))
|
||||
if shapef != nil && shapef.Primary() != nil {
|
||||
return shapef.Primary().Value.ScalarString()
|
||||
}
|
||||
|
|
@ -1569,30 +1580,30 @@ func ParentShape(n Node) string {
|
|||
}
|
||||
}
|
||||
|
||||
func countUnderscores(p []string) int {
|
||||
func countUnderscores(p []d2ast.String) int {
|
||||
for i, el := range p {
|
||||
if el != "_" {
|
||||
if el.ScalarString() != "_" || !el.IsUnquoted() {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func findBoardKeyword(ida ...string) int {
|
||||
func findBoardKeyword(ida ...d2ast.String) int {
|
||||
for i := range ida {
|
||||
if _, ok := d2ast.BoardKeywords[ida[i]]; ok {
|
||||
if _, ok := d2ast.BoardKeywords[strings.ToLower(ida[i].ScalarString())]; ok && ida[i].IsUnquoted() {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
func findProhibitedEdgeKeyword(ida ...string) int {
|
||||
func findProhibitedEdgeKeyword(ida ...d2ast.String) int {
|
||||
for i := range ida {
|
||||
if _, ok := d2ast.SimpleReservedKeywords[ida[i]]; ok {
|
||||
if _, ok := d2ast.SimpleReservedKeywords[ida[i].ScalarString()]; ok && ida[i].IsUnquoted() {
|
||||
return i
|
||||
}
|
||||
if _, ok := d2ast.ReservedKeywordHolders[ida[i]]; ok {
|
||||
if _, ok := d2ast.ReservedKeywordHolders[ida[i].ScalarString()]; ok && ida[i].IsUnquoted() {
|
||||
return i
|
||||
}
|
||||
}
|
||||
|
|
@ -1636,7 +1647,7 @@ func parentPrimaryKey(n Node) *d2ast.Key {
|
|||
}
|
||||
|
||||
// BoardIDA returns the absolute path to n from the nearest board root.
|
||||
func BoardIDA(n Node) (ida []string) {
|
||||
func BoardIDA(n Node) (ida []d2ast.String) {
|
||||
for {
|
||||
switch n := n.(type) {
|
||||
case *Field:
|
||||
|
|
@ -1657,7 +1668,7 @@ func BoardIDA(n Node) (ida []string) {
|
|||
}
|
||||
|
||||
// IDA returns the absolute path to n.
|
||||
func IDA(n Node) (ida []string) {
|
||||
func IDA(n Node) (ida []d2ast.String) {
|
||||
for {
|
||||
switch n := n.(type) {
|
||||
case *Field:
|
||||
|
|
@ -1678,7 +1689,7 @@ func IDA(n Node) (ida []string) {
|
|||
}
|
||||
|
||||
// RelIDA returns the path to n relative to p.
|
||||
func RelIDA(p, n Node) (ida []string) {
|
||||
func RelIDA(p, n Node) (ida []d2ast.String) {
|
||||
for {
|
||||
switch n := n.(type) {
|
||||
case *Field:
|
||||
|
|
@ -1688,7 +1699,7 @@ func RelIDA(p, n Node) (ida []string) {
|
|||
return ida
|
||||
}
|
||||
case *Edge:
|
||||
ida = append(ida, n.String())
|
||||
ida = append(ida, d2ast.FlatUnquotedString(n.String()))
|
||||
}
|
||||
n = n.Parent()
|
||||
f, fok := n.(*Field)
|
||||
|
|
@ -1700,11 +1711,11 @@ func RelIDA(p, n Node) (ida []string) {
|
|||
}
|
||||
}
|
||||
|
||||
func reverseIDA(ida []string) {
|
||||
for i := 0; i < len(ida)/2; i++ {
|
||||
tmp := ida[i]
|
||||
ida[i] = ida[len(ida)-i-1]
|
||||
ida[len(ida)-i-1] = tmp
|
||||
func reverseIDA[T any](slice []T) {
|
||||
for i := 0; i < len(slice)/2; i++ {
|
||||
tmp := slice[i]
|
||||
slice[i] = slice[len(slice)-i-1]
|
||||
slice[len(slice)-i-1] = tmp
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1779,7 +1790,7 @@ func (m *Map) Equal(n2 Node) bool {
|
|||
}
|
||||
|
||||
func (m *Map) InClass(key *d2ast.Key) bool {
|
||||
classes := m.Map().GetField("classes")
|
||||
classes := m.Map().GetField(d2ast.FlatUnquotedString("classes"))
|
||||
if classes == nil || classes.Map() == nil {
|
||||
return false
|
||||
}
|
||||
|
|
@ -1807,7 +1818,7 @@ func (m *Map) IsClass() bool {
|
|||
if parentBoard.Map() == nil {
|
||||
return false
|
||||
}
|
||||
classes := parentBoard.Map().GetField("classes")
|
||||
classes := parentBoard.Map().GetField(d2ast.FlatUnquotedString("classes"))
|
||||
if classes == nil || classes.Map() == nil {
|
||||
return false
|
||||
}
|
||||
|
|
@ -1828,13 +1839,13 @@ func (m *Map) FindBoardRoot(path []string) *Map {
|
|||
return m
|
||||
}
|
||||
|
||||
layersf := m.GetField("layers")
|
||||
scenariosf := m.GetField("scenarios")
|
||||
stepsf := m.GetField("steps")
|
||||
layersf := m.GetField(d2ast.FlatUnquotedString("layers"))
|
||||
scenariosf := m.GetField(d2ast.FlatUnquotedString("scenarios"))
|
||||
stepsf := m.GetField(d2ast.FlatUnquotedString("steps"))
|
||||
|
||||
if layersf != nil && layersf.Map() != nil {
|
||||
for _, f := range layersf.Map().Fields {
|
||||
if f.Name == path[0] {
|
||||
if f.Name.ScalarString() == path[0] {
|
||||
if len(path) == 1 {
|
||||
return f.Map()
|
||||
}
|
||||
|
|
@ -1845,7 +1856,7 @@ func (m *Map) FindBoardRoot(path []string) *Map {
|
|||
|
||||
if scenariosf != nil && scenariosf.Map() != nil {
|
||||
for _, f := range scenariosf.Map().Fields {
|
||||
if f.Name == path[0] {
|
||||
if f.Name.ScalarString() == path[0] {
|
||||
if len(path) == 1 {
|
||||
return f.Map()
|
||||
}
|
||||
|
|
@ -1856,7 +1867,7 @@ func (m *Map) FindBoardRoot(path []string) *Map {
|
|||
|
||||
if stepsf != nil && stepsf.Map() != nil {
|
||||
for _, f := range stepsf.Map().Fields {
|
||||
if f.Name == path[0] {
|
||||
if f.Name.ScalarString() == path[0] {
|
||||
if len(path) == 1 {
|
||||
return f.Map()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ func TestCopy(t *testing.T) {
|
|||
|
||||
const keyStr = `Absence makes the heart grow frantic.`
|
||||
f := &d2ir.Field{
|
||||
Name: keyStr,
|
||||
Name: d2ast.FlatUnquotedString(keyStr),
|
||||
|
||||
Primary_: s,
|
||||
Composite: a,
|
||||
|
|
@ -48,10 +48,10 @@ func TestCopy(t *testing.T) {
|
|||
}
|
||||
|
||||
m = m.Copy(nil).(*d2ir.Map)
|
||||
f.Name = `Many a wife thinks her husband is the world's greatest lover.`
|
||||
f.Name = d2ast.FlatUnquotedString(`Many a wife thinks her husband is the world's greatest lover.`)
|
||||
|
||||
assert.Equal(t, m, m.Fields[0].Parent())
|
||||
assert.Equal(t, keyStr, m.Fields[0].Name)
|
||||
assert.Equal(t, keyStr, m.Fields[0].Name.ScalarString())
|
||||
assert.Equal(t, m.Fields[0], m.Fields[0].Primary_.Parent())
|
||||
assert.Equal(t, m.Fields[0], m.Fields[0].Composite.(*d2ir.Array).Parent())
|
||||
|
||||
|
|
|
|||
|
|
@ -21,11 +21,14 @@ func (m *Map) multiGlob(pattern []string) ([]*Field, bool) {
|
|||
|
||||
func (m *Map) _doubleGlob(fa *[]*Field) {
|
||||
for _, f := range m.Fields {
|
||||
if _, ok := d2ast.ReservedKeywords[f.Name]; ok {
|
||||
if f.Name == "layers" {
|
||||
if f.Name == nil {
|
||||
continue
|
||||
}
|
||||
if _, ok := d2ast.ReservedKeywords[f.Name.ScalarString()]; ok && f.Name.IsUnquoted() {
|
||||
if f.Name.ScalarString() == "layers" {
|
||||
continue
|
||||
}
|
||||
if _, ok := d2ast.BoardKeywords[f.Name]; !ok {
|
||||
if _, ok := d2ast.BoardKeywords[f.Name.ScalarString()]; !ok {
|
||||
continue
|
||||
}
|
||||
// We don't ever want to append layers, scenarios or steps directly.
|
||||
|
|
@ -45,8 +48,8 @@ func (m *Map) _doubleGlob(fa *[]*Field) {
|
|||
|
||||
func (m *Map) _tripleGlob(fa *[]*Field) {
|
||||
for _, f := range m.Fields {
|
||||
if _, ok := d2ast.ReservedKeywords[f.Name]; ok {
|
||||
if _, ok := d2ast.BoardKeywords[f.Name]; !ok {
|
||||
if _, ok := d2ast.ReservedKeywords[f.Name.ScalarString()]; ok && f.Name.IsUnquoted() {
|
||||
if _, ok := d2ast.BoardKeywords[f.Name.ScalarString()]; !ok {
|
||||
continue
|
||||
}
|
||||
// We don't ever want to append layers, scenarios or steps directly.
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"oss.terrastruct.com/d2/d2ast"
|
||||
"oss.terrastruct.com/d2/d2compiler"
|
||||
"oss.terrastruct.com/d2/d2graph"
|
||||
"oss.terrastruct.com/d2/d2layouts/d2sequence"
|
||||
|
|
@ -321,7 +322,7 @@ container -> c: edge 1
|
|||
assert.True(t, has)
|
||||
b_t1.Box = geo.NewBox(nil, 100, 100)
|
||||
|
||||
c := g.Root.EnsureChild([]string{"c"})
|
||||
c := g.Root.EnsureChild([]d2ast.String{d2ast.FlatUnquotedString("c")})
|
||||
c.Box = geo.NewBox(nil, 100, 100)
|
||||
c.Shape = d2graph.Scalar{Value: d2target.ShapeSquare}
|
||||
|
||||
|
|
@ -379,7 +380,7 @@ container -> c: edge 1
|
|||
func TestSelfEdges(t *testing.T) {
|
||||
g := d2graph.NewGraph()
|
||||
g.Root.Shape = d2graph.Scalar{Value: d2target.ShapeSequenceDiagram}
|
||||
n1 := g.Root.EnsureChild([]string{"n1"})
|
||||
n1 := g.Root.EnsureChild([]d2ast.String{d2ast.FlatUnquotedString("n1")})
|
||||
n1.Box = geo.NewBox(nil, 100, 100)
|
||||
|
||||
g.Edges = []*d2graph.Edge{
|
||||
|
|
@ -415,12 +416,12 @@ func TestSelfEdges(t *testing.T) {
|
|||
func TestSequenceToDescendant(t *testing.T) {
|
||||
g := d2graph.NewGraph()
|
||||
g.Root.Shape = d2graph.Scalar{Value: d2target.ShapeSequenceDiagram}
|
||||
a := g.Root.EnsureChild([]string{"a"})
|
||||
a := g.Root.EnsureChild([]d2ast.String{d2ast.FlatUnquotedString("a")})
|
||||
a.Box = geo.NewBox(nil, 100, 100)
|
||||
a.Attributes = d2graph.Attributes{
|
||||
Shape: d2graph.Scalar{Value: shape.PERSON_TYPE},
|
||||
}
|
||||
a_t1 := a.EnsureChild([]string{"t1"})
|
||||
a_t1 := a.EnsureChild([]d2ast.String{d2ast.FlatUnquotedString("t1")})
|
||||
a_t1.Box = geo.NewBox(nil, 16, 80)
|
||||
|
||||
g.Edges = []*d2graph.Edge{
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ func GetRefRanges(path string, fs map[string]string, boardPath []string, key str
|
|||
var f *d2ir.Field
|
||||
if mk.Key != nil {
|
||||
for _, p := range mk.Key.Path {
|
||||
f = m.GetField(p.Unbox().ScalarString())
|
||||
f = m.GetField(p.Unbox())
|
||||
if f == nil {
|
||||
return nil, nil, nil
|
||||
}
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
BIN
e2etests-cli/testdata/TestCLI_E2E/no-nav-pdf.exp.pdf
vendored
BIN
e2etests-cli/testdata/TestCLI_E2E/theme-pdf.exp.pdf
vendored
305
e2etests/testdata/txtar/sql-table-reserved/dagre/board.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,305 @@
|
|||
{
|
||||
"name": "",
|
||||
"isFolderOnly": false,
|
||||
"fontFamily": "SourceSansPro",
|
||||
"shapes": [
|
||||
{
|
||||
"id": "my_table",
|
||||
"type": "sql_table",
|
||||
"pos": {
|
||||
"x": 0,
|
||||
"y": 166
|
||||
},
|
||||
"width": 200,
|
||||
"height": 200,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "N1",
|
||||
"stroke": "N7",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": {
|
||||
"Scheme": "https",
|
||||
"Opaque": "",
|
||||
"User": null,
|
||||
"Host": "static.wikia.nocookie.net",
|
||||
"Path": "/tomandjerry/images/4/46/JerryJumbo3-1-.jpg",
|
||||
"RawPath": "",
|
||||
"OmitHost": false,
|
||||
"ForceQuery": false,
|
||||
"RawQuery": "",
|
||||
"Fragment": "",
|
||||
"RawFragment": ""
|
||||
},
|
||||
"iconPosition": "OUTSIDE_TOP_LEFT",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": [
|
||||
{
|
||||
"name": {
|
||||
"label": "shape",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 51,
|
||||
"labelHeight": 26
|
||||
},
|
||||
"type": {
|
||||
"label": "string",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 48,
|
||||
"labelHeight": 26
|
||||
},
|
||||
"constraint": null,
|
||||
"reference": ""
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"label": "icon",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 35,
|
||||
"labelHeight": 26
|
||||
},
|
||||
"type": {
|
||||
"label": "string",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 48,
|
||||
"labelHeight": 26
|
||||
},
|
||||
"constraint": null,
|
||||
"reference": ""
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"label": "width",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 48,
|
||||
"labelHeight": 26
|
||||
},
|
||||
"type": {
|
||||
"label": "int",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 23,
|
||||
"labelHeight": 26
|
||||
},
|
||||
"constraint": null,
|
||||
"reference": ""
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"label": "height",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 53,
|
||||
"labelHeight": 26
|
||||
},
|
||||
"type": {
|
||||
"label": "int",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 23,
|
||||
"labelHeight": 26
|
||||
},
|
||||
"constraint": null,
|
||||
"reference": ""
|
||||
}
|
||||
],
|
||||
"label": "my_table",
|
||||
"fontSize": 20,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 99,
|
||||
"labelHeight": 31,
|
||||
"zIndex": 0,
|
||||
"level": 1,
|
||||
"primaryAccentColor": "B2",
|
||||
"secondaryAccentColor": "AA2",
|
||||
"neutralAccentColor": "N2"
|
||||
},
|
||||
{
|
||||
"id": "x",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 74,
|
||||
"y": 0
|
||||
},
|
||||
"width": 53,
|
||||
"height": 66,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "B6",
|
||||
"stroke": "B1",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "x",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 1
|
||||
}
|
||||
],
|
||||
"connections": [
|
||||
{
|
||||
"id": "(x -> my_table)[0]",
|
||||
"src": "x",
|
||||
"srcArrow": "none",
|
||||
"dst": "my_table",
|
||||
"dstArrow": "triangle",
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"stroke": "B1",
|
||||
"borderRadius": 10,
|
||||
"label": "",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N2",
|
||||
"italic": true,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 0,
|
||||
"labelHeight": 0,
|
||||
"labelPosition": "",
|
||||
"labelPercentage": 0,
|
||||
"route": [
|
||||
{
|
||||
"x": 100,
|
||||
"y": 66
|
||||
},
|
||||
{
|
||||
"x": 100,
|
||||
"y": 106
|
||||
},
|
||||
{
|
||||
"x": 100,
|
||||
"y": 126
|
||||
},
|
||||
{
|
||||
"x": 100,
|
||||
"y": 166
|
||||
}
|
||||
],
|
||||
"isCurve": true,
|
||||
"animated": false,
|
||||
"tooltip": "",
|
||||
"icon": null,
|
||||
"zIndex": 0
|
||||
}
|
||||
],
|
||||
"root": {
|
||||
"id": "",
|
||||
"type": "",
|
||||
"pos": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"width": 0,
|
||||
"height": 0,
|
||||
"opacity": 0,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 0,
|
||||
"borderRadius": 0,
|
||||
"fill": "N7",
|
||||
"stroke": "",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 0,
|
||||
"labelHeight": 0,
|
||||
"zIndex": 0,
|
||||
"level": 0
|
||||
}
|
||||
}
|
||||
102
e2etests/testdata/txtar/sql-table-reserved/dagre/sketch.exp.svg
vendored
Normal file
|
After Width: | Height: | Size: 18 KiB |
300
e2etests/testdata/txtar/sql-table-reserved/elk/board.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,300 @@
|
|||
{
|
||||
"name": "",
|
||||
"isFolderOnly": false,
|
||||
"fontFamily": "SourceSansPro",
|
||||
"shapes": [
|
||||
{
|
||||
"id": "my_table",
|
||||
"type": "sql_table",
|
||||
"pos": {
|
||||
"x": 78,
|
||||
"y": 217
|
||||
},
|
||||
"width": 200,
|
||||
"height": 200,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "N1",
|
||||
"stroke": "N7",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": {
|
||||
"Scheme": "https",
|
||||
"Opaque": "",
|
||||
"User": null,
|
||||
"Host": "static.wikia.nocookie.net",
|
||||
"Path": "/tomandjerry/images/4/46/JerryJumbo3-1-.jpg",
|
||||
"RawPath": "",
|
||||
"OmitHost": false,
|
||||
"ForceQuery": false,
|
||||
"RawQuery": "",
|
||||
"Fragment": "",
|
||||
"RawFragment": ""
|
||||
},
|
||||
"iconPosition": "OUTSIDE_TOP_LEFT",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": [
|
||||
{
|
||||
"name": {
|
||||
"label": "shape",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 51,
|
||||
"labelHeight": 26
|
||||
},
|
||||
"type": {
|
||||
"label": "string",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 48,
|
||||
"labelHeight": 26
|
||||
},
|
||||
"constraint": null,
|
||||
"reference": ""
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"label": "icon",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 35,
|
||||
"labelHeight": 26
|
||||
},
|
||||
"type": {
|
||||
"label": "string",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 48,
|
||||
"labelHeight": 26
|
||||
},
|
||||
"constraint": null,
|
||||
"reference": ""
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"label": "width",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 48,
|
||||
"labelHeight": 26
|
||||
},
|
||||
"type": {
|
||||
"label": "int",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 23,
|
||||
"labelHeight": 26
|
||||
},
|
||||
"constraint": null,
|
||||
"reference": ""
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"label": "height",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 53,
|
||||
"labelHeight": 26
|
||||
},
|
||||
"type": {
|
||||
"label": "int",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 23,
|
||||
"labelHeight": 26
|
||||
},
|
||||
"constraint": null,
|
||||
"reference": ""
|
||||
}
|
||||
],
|
||||
"label": "my_table",
|
||||
"fontSize": 20,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 99,
|
||||
"labelHeight": 31,
|
||||
"zIndex": 0,
|
||||
"level": 1,
|
||||
"primaryAccentColor": "B2",
|
||||
"secondaryAccentColor": "AA2",
|
||||
"neutralAccentColor": "N2"
|
||||
},
|
||||
{
|
||||
"id": "x",
|
||||
"type": "rectangle",
|
||||
"pos": {
|
||||
"x": 12,
|
||||
"y": 12
|
||||
},
|
||||
"width": 53,
|
||||
"height": 66,
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"borderRadius": 0,
|
||||
"fill": "B6",
|
||||
"stroke": "B1",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "x",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N1",
|
||||
"italic": false,
|
||||
"bold": true,
|
||||
"underline": false,
|
||||
"labelWidth": 8,
|
||||
"labelHeight": 21,
|
||||
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||
"zIndex": 0,
|
||||
"level": 1
|
||||
}
|
||||
],
|
||||
"connections": [
|
||||
{
|
||||
"id": "(x -> my_table)[0]",
|
||||
"src": "x",
|
||||
"srcArrow": "none",
|
||||
"dst": "my_table",
|
||||
"dstArrow": "triangle",
|
||||
"opacity": 1,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 2,
|
||||
"stroke": "B1",
|
||||
"borderRadius": 10,
|
||||
"label": "",
|
||||
"fontSize": 16,
|
||||
"fontFamily": "DEFAULT",
|
||||
"language": "",
|
||||
"color": "N2",
|
||||
"italic": true,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 0,
|
||||
"labelHeight": 0,
|
||||
"labelPosition": "",
|
||||
"labelPercentage": 0,
|
||||
"route": [
|
||||
{
|
||||
"x": 38.5,
|
||||
"y": 77.6989974975586
|
||||
},
|
||||
{
|
||||
"x": 38.5,
|
||||
"y": 228.6999969482422
|
||||
},
|
||||
{
|
||||
"x": 78.5,
|
||||
"y": 228.6999969482422
|
||||
}
|
||||
],
|
||||
"animated": false,
|
||||
"tooltip": "",
|
||||
"icon": null,
|
||||
"zIndex": 0
|
||||
}
|
||||
],
|
||||
"root": {
|
||||
"id": "",
|
||||
"type": "",
|
||||
"pos": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"width": 0,
|
||||
"height": 0,
|
||||
"opacity": 0,
|
||||
"strokeDash": 0,
|
||||
"strokeWidth": 0,
|
||||
"borderRadius": 0,
|
||||
"fill": "N7",
|
||||
"stroke": "",
|
||||
"shadow": false,
|
||||
"3d": false,
|
||||
"multiple": false,
|
||||
"double-border": false,
|
||||
"tooltip": "",
|
||||
"link": "",
|
||||
"icon": null,
|
||||
"iconPosition": "",
|
||||
"blend": false,
|
||||
"fields": null,
|
||||
"methods": null,
|
||||
"columns": null,
|
||||
"label": "",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 0,
|
||||
"labelHeight": 0,
|
||||
"zIndex": 0,
|
||||
"level": 0
|
||||
}
|
||||
}
|
||||
102
e2etests/testdata/txtar/sql-table-reserved/elk/sketch.exp.svg
vendored
Normal file
|
After Width: | Height: | Size: 18 KiB |
|
|
@ -643,3 +643,17 @@ financial.style.fill: "#e8f4f8"
|
|||
monitoring.style.fill: "#f8e8e8"
|
||||
projects.style.fill: "#e8f8e8"
|
||||
team.style.fill: "#f8f0e8"
|
||||
|
||||
-- sql-table-reserved --
|
||||
my_table: {
|
||||
shape: sql_table
|
||||
icon: https://static.wikia.nocookie.net/tomandjerry/images/4/46/JerryJumbo3-1-.jpg
|
||||
width: 200
|
||||
height: 200
|
||||
"shape": string
|
||||
"icon": string
|
||||
"width": int
|
||||
"height": int
|
||||
}
|
||||
|
||||
x -> my_table."shape"
|
||||
|
|
|
|||
15
testdata/d2compiler/TestCompile/import-link-layer-1.exp.json
generated
vendored
|
|
@ -246,10 +246,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "a"
|
||||
"string": "a",
|
||||
"raw_string": "a"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -269,10 +270,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,0:2:2-0:6:6",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -399,10 +401,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/import-link-layer-1.d2,4:7:33-4:9:35",
|
||||
"value": [
|
||||
{
|
||||
"string": "hi"
|
||||
"string": "hi",
|
||||
"raw_string": "hi"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
5
testdata/d2compiler/TestCompile/import-link-layer-2.exp.json
generated
vendored
|
|
@ -208,10 +208,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/import-link-layer-2.d2,3:7:24-3:9:26",
|
||||
"value": [
|
||||
{
|
||||
"string": "hi"
|
||||
"string": "hi",
|
||||
"raw_string": "hi"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
40
testdata/d2compiler/TestCompile/import-link-layer-3.exp.json
generated
vendored
|
|
@ -246,10 +246,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "a"
|
||||
"string": "a",
|
||||
"raw_string": "a"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -268,10 +269,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,1:0:2-1:6:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers"
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -291,10 +293,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,2:2:14-2:5:17",
|
||||
"value": [
|
||||
{
|
||||
"string": "lol"
|
||||
"string": "lol",
|
||||
"raw_string": "lol"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -314,10 +317,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,3:4:25-3:8:29",
|
||||
"value": [
|
||||
{
|
||||
"string": "asdf"
|
||||
"string": "asdf",
|
||||
"raw_string": "asdf"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -337,10 +341,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,3:9:30-3:13:34",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -463,10 +468,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,3:4:25-3:8:29",
|
||||
"value": [
|
||||
{
|
||||
"string": "asdf"
|
||||
"string": "asdf",
|
||||
"raw_string": "asdf"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -486,10 +492,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,3:9:30-3:13:34",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -618,10 +625,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/import-link-layer-3.d2,4:7:33-4:9:35",
|
||||
"value": [
|
||||
{
|
||||
"string": "hi"
|
||||
"string": "hi",
|
||||
"raw_string": "hi"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
55
testdata/d2compiler/TestCompile/import-link-layer-4.exp.json
generated
vendored
|
|
@ -264,10 +264,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "a"
|
||||
"string": "a",
|
||||
"raw_string": "a"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -286,10 +287,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,1:0:2-1:6:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers"
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -309,10 +311,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,2:2:14-2:5:17",
|
||||
"value": [
|
||||
{
|
||||
"string": "lol"
|
||||
"string": "lol",
|
||||
"raw_string": "lol"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -332,10 +335,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,3:4:25-3:8:29",
|
||||
"value": [
|
||||
{
|
||||
"string": "asdf"
|
||||
"string": "asdf",
|
||||
"raw_string": "asdf"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -355,10 +359,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,3:9:30-3:13:34",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -396,10 +401,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,5:1:52-5:2:53",
|
||||
"value": [
|
||||
{
|
||||
"string": "z"
|
||||
"string": "z",
|
||||
"raw_string": "z"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -419,10 +425,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,5:6:57-5:9:60",
|
||||
"value": [
|
||||
{
|
||||
"string": "fjf"
|
||||
"string": "fjf",
|
||||
"raw_string": "fjf"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -531,10 +538,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,3:4:25-3:8:29",
|
||||
"value": [
|
||||
{
|
||||
"string": "asdf"
|
||||
"string": "asdf",
|
||||
"raw_string": "asdf"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -554,10 +562,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,3:9:30-3:13:34",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -684,10 +693,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,5:6:57-5:9:60",
|
||||
"value": [
|
||||
{
|
||||
"string": "fjf"
|
||||
"string": "fjf",
|
||||
"raw_string": "fjf"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -788,10 +798,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/import-link-layer-4.d2,4:7:28-4:9:30",
|
||||
"value": [
|
||||
{
|
||||
"string": "hi"
|
||||
"string": "hi",
|
||||
"raw_string": "hi"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
180
testdata/d2compiler/TestCompile/import-link-underscore-1.exp.json
generated
vendored
|
|
@ -194,10 +194,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "a"
|
||||
"string": "a",
|
||||
"raw_string": "a"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -216,10 +217,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,1:0:2-1:6:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers"
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -239,10 +241,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,2:2:14-2:3:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "b"
|
||||
"string": "b",
|
||||
"raw_string": "b"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -262,10 +265,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,3:4:23-3:5:24",
|
||||
"value": [
|
||||
{
|
||||
"string": "d"
|
||||
"string": "d",
|
||||
"raw_string": "d"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -285,10 +289,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,3:6:25-3:10:29",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -321,10 +326,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,4:2:35-4:3:36",
|
||||
"value": [
|
||||
{
|
||||
"string": "s"
|
||||
"string": "s",
|
||||
"raw_string": "s"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -344,10 +350,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,4:4:37-4:8:41",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -380,10 +387,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,6:4:59-6:10:65",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers"
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -403,10 +411,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,7:6:75-7:7:76",
|
||||
"value": [
|
||||
{
|
||||
"string": "c"
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -426,10 +435,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,8:8:88-8:9:89",
|
||||
"value": [
|
||||
{
|
||||
"string": "c"
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -449,10 +459,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,8:10:90-8:14:94",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -485,10 +496,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,9:4:102-9:5:103",
|
||||
"value": [
|
||||
{
|
||||
"string": "z"
|
||||
"string": "z",
|
||||
"raw_string": "z"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -508,10 +520,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,9:6:104-9:10:108",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -544,10 +557,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,10:4:118-10:5:119",
|
||||
"value": [
|
||||
{
|
||||
"string": "f"
|
||||
"string": "f",
|
||||
"raw_string": "f"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -567,10 +581,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,10:6:120-10:10:124",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -618,10 +633,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,14:2:159-14:3:160",
|
||||
"value": [
|
||||
{
|
||||
"string": "k"
|
||||
"string": "k",
|
||||
"raw_string": "k"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -641,10 +657,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,15:4:168-15:5:169",
|
||||
"value": [
|
||||
{
|
||||
"string": "k"
|
||||
"string": "k",
|
||||
"raw_string": "k"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -753,10 +770,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,3:4:23-3:5:24",
|
||||
"value": [
|
||||
{
|
||||
"string": "d"
|
||||
"string": "d",
|
||||
"raw_string": "d"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -776,10 +794,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,3:6:25-3:10:29",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -812,10 +831,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,4:2:35-4:3:36",
|
||||
"value": [
|
||||
{
|
||||
"string": "s"
|
||||
"string": "s",
|
||||
"raw_string": "s"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -835,10 +855,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,4:4:37-4:8:41",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -871,10 +892,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,6:4:59-6:10:65",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers"
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -894,10 +916,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,7:6:75-7:7:76",
|
||||
"value": [
|
||||
{
|
||||
"string": "c"
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -917,10 +940,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,8:8:88-8:9:89",
|
||||
"value": [
|
||||
{
|
||||
"string": "c"
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -940,10 +964,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,8:10:90-8:14:94",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -976,10 +1001,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,9:4:102-9:5:103",
|
||||
"value": [
|
||||
{
|
||||
"string": "z"
|
||||
"string": "z",
|
||||
"raw_string": "z"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -999,10 +1025,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,9:6:104-9:10:108",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1035,10 +1062,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,10:4:118-10:5:119",
|
||||
"value": [
|
||||
{
|
||||
"string": "f"
|
||||
"string": "f",
|
||||
"raw_string": "f"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1058,10 +1086,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,10:6:120-10:10:124",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1257,10 +1286,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,8:8:88-8:9:89",
|
||||
"value": [
|
||||
{
|
||||
"string": "c"
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1280,10 +1310,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,8:10:90-8:14:94",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1316,10 +1347,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,9:4:102-9:5:103",
|
||||
"value": [
|
||||
{
|
||||
"string": "z"
|
||||
"string": "z",
|
||||
"raw_string": "z"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1339,10 +1371,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,9:6:104-9:10:108",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1375,10 +1408,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,10:4:118-10:5:119",
|
||||
"value": [
|
||||
{
|
||||
"string": "f"
|
||||
"string": "f",
|
||||
"raw_string": "f"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1398,10 +1432,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,10:6:120-10:10:124",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1648,10 +1683,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,15:4:168-15:5:169",
|
||||
"value": [
|
||||
{
|
||||
"string": "k"
|
||||
"string": "k",
|
||||
"raw_string": "k"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
180
testdata/d2compiler/TestCompile/import-link-underscore-2.exp.json
generated
vendored
|
|
@ -212,10 +212,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "a"
|
||||
"string": "a",
|
||||
"raw_string": "a"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -234,10 +235,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,1:0:2-1:6:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers"
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -257,10 +259,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,2:2:14-2:3:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "b"
|
||||
"string": "b",
|
||||
"raw_string": "b"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -280,10 +283,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,3:4:23-3:5:24",
|
||||
"value": [
|
||||
{
|
||||
"string": "d"
|
||||
"string": "d",
|
||||
"raw_string": "d"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -303,10 +307,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,3:6:25-3:10:29",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -339,10 +344,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,4:2:35-4:3:36",
|
||||
"value": [
|
||||
{
|
||||
"string": "s"
|
||||
"string": "s",
|
||||
"raw_string": "s"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -362,10 +368,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,4:4:37-4:8:41",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -398,10 +405,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,6:4:59-6:10:65",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers"
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -421,10 +429,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,7:6:75-7:7:76",
|
||||
"value": [
|
||||
{
|
||||
"string": "c"
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -444,10 +453,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,8:8:88-8:9:89",
|
||||
"value": [
|
||||
{
|
||||
"string": "c"
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -467,10 +477,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,8:10:90-8:14:94",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -503,10 +514,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,9:4:102-9:5:103",
|
||||
"value": [
|
||||
{
|
||||
"string": "z"
|
||||
"string": "z",
|
||||
"raw_string": "z"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -526,10 +538,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,9:6:104-9:10:108",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -562,10 +575,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,10:4:118-10:5:119",
|
||||
"value": [
|
||||
{
|
||||
"string": "f"
|
||||
"string": "f",
|
||||
"raw_string": "f"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -585,10 +599,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,10:6:120-10:10:124",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -636,10 +651,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,14:2:159-14:3:160",
|
||||
"value": [
|
||||
{
|
||||
"string": "k"
|
||||
"string": "k",
|
||||
"raw_string": "k"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -659,10 +675,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,15:4:168-15:5:169",
|
||||
"value": [
|
||||
{
|
||||
"string": "k"
|
||||
"string": "k",
|
||||
"raw_string": "k"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -771,10 +788,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,3:4:23-3:5:24",
|
||||
"value": [
|
||||
{
|
||||
"string": "d"
|
||||
"string": "d",
|
||||
"raw_string": "d"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -794,10 +812,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,3:6:25-3:10:29",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -830,10 +849,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,4:2:35-4:3:36",
|
||||
"value": [
|
||||
{
|
||||
"string": "s"
|
||||
"string": "s",
|
||||
"raw_string": "s"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -853,10 +873,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,4:4:37-4:8:41",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -889,10 +910,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,6:4:59-6:10:65",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers"
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -912,10 +934,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,7:6:75-7:7:76",
|
||||
"value": [
|
||||
{
|
||||
"string": "c"
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -935,10 +958,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,8:8:88-8:9:89",
|
||||
"value": [
|
||||
{
|
||||
"string": "c"
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -958,10 +982,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,8:10:90-8:14:94",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -994,10 +1019,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,9:4:102-9:5:103",
|
||||
"value": [
|
||||
{
|
||||
"string": "z"
|
||||
"string": "z",
|
||||
"raw_string": "z"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1017,10 +1043,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,9:6:104-9:10:108",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1053,10 +1080,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,10:4:118-10:5:119",
|
||||
"value": [
|
||||
{
|
||||
"string": "f"
|
||||
"string": "f",
|
||||
"raw_string": "f"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1076,10 +1104,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,10:6:120-10:10:124",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1275,10 +1304,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,8:8:88-8:9:89",
|
||||
"value": [
|
||||
{
|
||||
"string": "c"
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1298,10 +1328,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,8:10:90-8:14:94",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1334,10 +1365,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,9:4:102-9:5:103",
|
||||
"value": [
|
||||
{
|
||||
"string": "z"
|
||||
"string": "z",
|
||||
"raw_string": "z"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1357,10 +1389,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,9:6:104-9:10:108",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1393,10 +1426,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,10:4:118-10:5:119",
|
||||
"value": [
|
||||
{
|
||||
"string": "f"
|
||||
"string": "f",
|
||||
"raw_string": "f"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1416,10 +1450,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,10:6:120-10:10:124",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1666,10 +1701,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,15:4:168-15:5:169",
|
||||
"value": [
|
||||
{
|
||||
"string": "k"
|
||||
"string": "k",
|
||||
"raw_string": "k"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
40
testdata/d2compiler/TestCompile/import-link-underscore-3.exp.json
generated
vendored
|
|
@ -264,10 +264,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "a"
|
||||
"string": "a",
|
||||
"raw_string": "a"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -286,10 +287,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,1:0:2-1:6:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers"
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -309,10 +311,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,2:2:14-2:3:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "y"
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -332,10 +335,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "o"
|
||||
"string": "o",
|
||||
"raw_string": "o"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -355,10 +359,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,0:2:2-0:6:6",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -481,10 +486,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "o"
|
||||
"string": "o",
|
||||
"raw_string": "o"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -504,10 +510,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y.d2,0:2:2-0:6:6",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -636,10 +643,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/import-link-underscore-3.d2,5:4:31-5:5:32",
|
||||
"value": [
|
||||
{
|
||||
"string": "b"
|
||||
"string": "b",
|
||||
"raw_string": "b"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
60
testdata/d2compiler/TestCompile/import-nested-layers.exp.json
generated
vendored
|
|
@ -194,10 +194,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "a"
|
||||
"string": "a",
|
||||
"raw_string": "a"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -216,10 +217,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,1:0:2-1:6:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers"
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -239,10 +241,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,2:2:14-2:3:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "b"
|
||||
"string": "b",
|
||||
"raw_string": "b"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -262,10 +265,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,3:2:21-3:3:22",
|
||||
"value": [
|
||||
{
|
||||
"string": "d"
|
||||
"string": "d",
|
||||
"raw_string": "d"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -284,10 +288,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,5:2:26-5:8:32",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers"
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -307,10 +312,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,6:4:40-6:5:41",
|
||||
"value": [
|
||||
{
|
||||
"string": "c"
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -330,10 +336,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,7:5:50-7:6:51",
|
||||
"value": [
|
||||
{
|
||||
"string": "c"
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -452,10 +459,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,3:2:21-3:3:22",
|
||||
"value": [
|
||||
{
|
||||
"string": "d"
|
||||
"string": "d",
|
||||
"raw_string": "d"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -474,10 +482,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,5:2:26-5:8:32",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers"
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -497,10 +506,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,6:4:40-6:5:41",
|
||||
"value": [
|
||||
{
|
||||
"string": "c"
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -520,10 +530,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,7:5:50-7:6:51",
|
||||
"value": [
|
||||
{
|
||||
"string": "c"
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -632,10 +643,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,7:5:50-7:6:51",
|
||||
"value": [
|
||||
{
|
||||
"string": "c"
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
5
testdata/d2compiler/TestCompile/link-board-key-nested.exp.json
generated
vendored
|
|
@ -306,10 +306,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-key-nested.d2,5:4:47-5:6:49",
|
||||
"value": [
|
||||
{
|
||||
"string": "yo"
|
||||
"string": "yo",
|
||||
"raw_string": "yo"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
30
testdata/d2compiler/TestCompile/link-board-mixed.exp.json
generated
vendored
|
|
@ -431,10 +431,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-mixed.d2,5:4:81-5:11:88",
|
||||
"value": [
|
||||
{
|
||||
"string": "the cat"
|
||||
"string": "the cat",
|
||||
"raw_string": "the cat"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -453,10 +454,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-mixed.d2,5:15:92-5:24:101",
|
||||
"value": [
|
||||
{
|
||||
"string": "meeeowwww"
|
||||
"string": "meeeowwww",
|
||||
"raw_string": "meeeowwww"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -687,10 +689,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-mixed.d2,0:0:0-0:8:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "question"
|
||||
"string": "question",
|
||||
"raw_string": "question"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -720,10 +723,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-mixed.d2,1:9:40-1:13:44",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -751,10 +755,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-mixed.d2,11:13:152-11:18:157",
|
||||
"value": [
|
||||
{
|
||||
"string": "style"
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -774,10 +779,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-mixed.d2,11:19:158-11:23:162",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill"
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
20
testdata/d2compiler/TestCompile/link-board-nested.exp.json
generated
vendored
|
|
@ -290,10 +290,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,3:4:47-3:10:53",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers"
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -313,10 +314,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,4:6:63-4:7:64",
|
||||
"value": [
|
||||
{
|
||||
"string": "x"
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -336,10 +338,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,5:8:76-5:13:81",
|
||||
"value": [
|
||||
{
|
||||
"string": "hello"
|
||||
"string": "hello",
|
||||
"raw_string": "hello"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -402,10 +405,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,5:8:76-5:13:81",
|
||||
"value": [
|
||||
{
|
||||
"string": "hello"
|
||||
"string": "hello",
|
||||
"raw_string": "hello"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
5
testdata/d2compiler/TestCompile/link-board-not-board.exp.json
generated
vendored
|
|
@ -297,10 +297,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-not-board.d2,4:4:44-4:5:45",
|
||||
"value": [
|
||||
{
|
||||
"string": "y"
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
20
testdata/d2compiler/TestCompile/link-board-not-found-2.exp.json
generated
vendored
|
|
@ -258,10 +258,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-not-found-2.d2,2:8:29-2:12:33",
|
||||
"value": [
|
||||
{
|
||||
"string": "ping"
|
||||
"string": "ping",
|
||||
"raw_string": "ping"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -281,10 +282,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-not-found-2.d2,3:12:49-3:16:53",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -398,10 +400,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-not-found-2.d2,7:8:94-7:12:98",
|
||||
"value": [
|
||||
{
|
||||
"string": "pong"
|
||||
"string": "pong",
|
||||
"raw_string": "pong"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -421,10 +424,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-not-found-2.d2,8:12:114-8:16:118",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
5
testdata/d2compiler/TestCompile/link-board-ok.exp.json
generated
vendored
|
|
@ -232,10 +232,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-ok.d2,3:3:36-3:4:37",
|
||||
"value": [
|
||||
{
|
||||
"string": "y"
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
35
testdata/d2compiler/TestCompile/link-board-underscore-not-found.exp.json
generated
vendored
|
|
@ -299,10 +299,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-underscore-not-found.d2,3:4:23-3:6:25",
|
||||
"value": [
|
||||
{
|
||||
"string": "yo"
|
||||
"string": "yo",
|
||||
"raw_string": "yo"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -321,10 +322,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-underscore-not-found.d2,4:4:30-4:10:36",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers"
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -344,10 +346,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-underscore-not-found.d2,5:6:46-5:7:47",
|
||||
"value": [
|
||||
{
|
||||
"string": "x"
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -367,10 +370,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-underscore-not-found.d2,6:8:59-6:13:64",
|
||||
"value": [
|
||||
{
|
||||
"string": "hello"
|
||||
"string": "hello",
|
||||
"raw_string": "hello"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -390,10 +394,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-underscore-not-found.d2,6:14:65-6:18:69",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -516,10 +521,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-underscore-not-found.d2,6:8:59-6:13:64",
|
||||
"value": [
|
||||
{
|
||||
"string": "hello"
|
||||
"string": "hello",
|
||||
"raw_string": "hello"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -539,10 +545,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-underscore-not-found.d2,6:14:65-6:18:69",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
55
testdata/d2compiler/TestCompile/link-board-underscore.exp.json
generated
vendored
|
|
@ -343,10 +343,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-underscore.d2,3:3:21-3:5:23",
|
||||
"value": [
|
||||
{
|
||||
"string": "yo"
|
||||
"string": "yo",
|
||||
"raw_string": "yo"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -365,10 +366,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-underscore.d2,4:4:28-4:10:34",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers"
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -388,10 +390,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-underscore.d2,5:6:44-5:7:45",
|
||||
"value": [
|
||||
{
|
||||
"string": "x"
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -411,10 +414,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-underscore.d2,6:8:57-6:13:62",
|
||||
"value": [
|
||||
{
|
||||
"string": "hello"
|
||||
"string": "hello",
|
||||
"raw_string": "hello"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -434,10 +438,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-underscore.d2,6:14:63-6:18:67",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -470,10 +475,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-underscore.d2,7:8:90-7:11:93",
|
||||
"value": [
|
||||
{
|
||||
"string": "hey"
|
||||
"string": "hey",
|
||||
"raw_string": "hey"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -493,10 +499,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-underscore.d2,7:12:94-7:16:98",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -619,10 +626,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-underscore.d2,6:8:57-6:13:62",
|
||||
"value": [
|
||||
{
|
||||
"string": "hello"
|
||||
"string": "hello",
|
||||
"raw_string": "hello"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -642,10 +650,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-underscore.d2,6:14:63-6:18:67",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -678,10 +687,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-underscore.d2,7:8:90-7:11:93",
|
||||
"value": [
|
||||
{
|
||||
"string": "hey"
|
||||
"string": "hey",
|
||||
"raw_string": "hey"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -701,10 +711,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/link-board-underscore.d2,7:12:94-7:16:98",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
90
testdata/d2compiler/TestCompile/link-file-underscore.exp.json
generated
vendored
|
|
@ -113,10 +113,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,3:7:20-3:8:21",
|
||||
"value": [
|
||||
{
|
||||
"string": "c"
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -215,10 +216,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,4:7:31-4:8:32",
|
||||
"value": [
|
||||
{
|
||||
"string": "d"
|
||||
"string": "d",
|
||||
"raw_string": "d"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -238,10 +240,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,4:9:33-4:13:37",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -368,10 +371,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,6:4:62-6:5:63",
|
||||
"value": [
|
||||
{
|
||||
"string": "l"
|
||||
"string": "l",
|
||||
"raw_string": "l"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -390,10 +394,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,8:2:67-8:8:73",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers"
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -413,10 +418,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,9:3:80-9:4:81",
|
||||
"value": [
|
||||
{
|
||||
"string": "j"
|
||||
"string": "j",
|
||||
"raw_string": "j"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -436,10 +442,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,10:5:90-10:6:91",
|
||||
"value": [
|
||||
{
|
||||
"string": "k"
|
||||
"string": "k",
|
||||
"raw_string": "k"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -459,10 +466,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,10:7:92-10:11:96",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -495,10 +503,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,11:5:105-11:6:106",
|
||||
"value": [
|
||||
{
|
||||
"string": "n"
|
||||
"string": "n",
|
||||
"raw_string": "n"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -518,10 +527,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,11:7:107-11:11:111",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -554,10 +564,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,12:5:122-12:6:123",
|
||||
"value": [
|
||||
{
|
||||
"string": "m"
|
||||
"string": "m",
|
||||
"raw_string": "m"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -577,10 +588,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,12:7:124-12:11:128",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -703,10 +715,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,10:5:90-10:6:91",
|
||||
"value": [
|
||||
{
|
||||
"string": "k"
|
||||
"string": "k",
|
||||
"raw_string": "k"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -726,10 +739,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,10:7:92-10:11:96",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -762,10 +776,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,11:5:105-11:6:106",
|
||||
"value": [
|
||||
{
|
||||
"string": "n"
|
||||
"string": "n",
|
||||
"raw_string": "n"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -785,10 +800,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,11:7:107-11:11:111",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -821,10 +837,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,12:5:122-12:6:123",
|
||||
"value": [
|
||||
{
|
||||
"string": "m"
|
||||
"string": "m",
|
||||
"raw_string": "m"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -844,10 +861,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,12:7:124-12:11:128",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
35
testdata/d2compiler/TestCompile/multiple-import-nested-layers.exp.json
generated
vendored
|
|
@ -194,10 +194,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y/x.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "a"
|
||||
"string": "a",
|
||||
"raw_string": "a"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -217,10 +218,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y/x.d2,0:2:2-0:3:3",
|
||||
"value": [
|
||||
{
|
||||
"string": "c"
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -240,10 +242,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y/x.d2,0:4:4-0:8:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -281,10 +284,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y/x.d2,2:0:20-2:6:26",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers"
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -304,10 +308,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y/x.d2,3:2:32-3:3:33",
|
||||
"value": [
|
||||
{
|
||||
"string": "b"
|
||||
"string": "b",
|
||||
"raw_string": "b"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -327,10 +332,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y/n.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "p"
|
||||
"string": "p",
|
||||
"raw_string": "p"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -531,10 +537,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/y/n.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "p"
|
||||
"string": "p",
|
||||
"raw_string": "p"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
25
testdata/d2compiler/TestCompile/no-self-link.exp.json
generated
vendored
|
|
@ -334,10 +334,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/no-self-link.d2,5:4:43-5:5:44",
|
||||
"value": [
|
||||
{
|
||||
"string": "s"
|
||||
"string": "s",
|
||||
"raw_string": "s"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -357,10 +358,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/no-self-link.d2,5:6:45-5:10:49",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -486,10 +488,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/no-self-link.d2,1:0:1-1:1:2",
|
||||
"value": [
|
||||
{
|
||||
"string": "x"
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -509,10 +512,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/no-self-link.d2,1:2:3-1:6:7",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -545,10 +549,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/no-self-link.d2,11:4:93-11:5:94",
|
||||
"value": [
|
||||
{
|
||||
"string": "b"
|
||||
"string": "b",
|
||||
"raw_string": "b"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
190
testdata/d2compiler/TestCompile/reserved_quoted/1.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,190 @@
|
|||
{
|
||||
"graph": {
|
||||
"name": "",
|
||||
"isFolderOnly": false,
|
||||
"ast": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/1.d2,0:0:0-3:0:24",
|
||||
"nodes": [
|
||||
{
|
||||
"map_key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/1.d2,0:0:0-2:1:23",
|
||||
"key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/1.d2,0:0:0-0:1:1",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/1.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"map": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/1.d2,0:3:3-2:1:23",
|
||||
"nodes": [
|
||||
{
|
||||
"map_key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/1.d2,1:2:7-1:16:21",
|
||||
"key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/1.d2,1:2:7-1:9:14",
|
||||
"path": [
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/1.d2,1:2:7-1:9:14",
|
||||
"value": [
|
||||
{
|
||||
"string": "label",
|
||||
"raw_string": "label"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/1.d2,1:11:16-1:16:21",
|
||||
"value": [
|
||||
{
|
||||
"string": "hello",
|
||||
"raw_string": "hello"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"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/TestCompile/reserved_quoted/1.d2,0:0:0-0:1:1",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/1.d2,0:0:0-0:1:1",
|
||||
"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": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
"value": "rectangle"
|
||||
},
|
||||
"direction": {
|
||||
"value": ""
|
||||
},
|
||||
"constraint": null
|
||||
},
|
||||
"zIndex": 0
|
||||
},
|
||||
{
|
||||
"id": "label",
|
||||
"id_val": "label",
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/1.d2,1:2:7-1:9:14",
|
||||
"path": [
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/1.d2,1:2:7-1:9:14",
|
||||
"value": [
|
||||
{
|
||||
"string": "label",
|
||||
"raw_string": "label"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path_index": 0,
|
||||
"map_key_edge_index": -1
|
||||
}
|
||||
],
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": "hello"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
"value": "rectangle"
|
||||
},
|
||||
"direction": {
|
||||
"value": ""
|
||||
},
|
||||
"constraint": null
|
||||
},
|
||||
"zIndex": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"err": null
|
||||
}
|
||||
457
testdata/d2compiler/TestCompile/reserved_quoted/2.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,457 @@
|
|||
{
|
||||
"graph": {
|
||||
"name": "",
|
||||
"isFolderOnly": false,
|
||||
"ast": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,0:0:0-9:2:128",
|
||||
"nodes": [
|
||||
{
|
||||
"map_key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,0:0:0-8:1:125",
|
||||
"key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,0:0:0-0:8:8",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,0:0:0-0:8:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "my_table",
|
||||
"raw_string": "my_table"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"map": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,0:10:10-8:1:125",
|
||||
"nodes": [
|
||||
{
|
||||
"map_key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,1:2:14-1:18:30",
|
||||
"key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,1:2:14-1:7:19",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,1:2:14-1:7:19",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,1:9:21-1:18:30",
|
||||
"value": [
|
||||
{
|
||||
"string": "sql_table",
|
||||
"raw_string": "sql_table"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"map_key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,2:2:33-2:12:43",
|
||||
"key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,2:2:33-2:7:38",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,2:2:33-2:7:38",
|
||||
"value": [
|
||||
{
|
||||
"string": "width",
|
||||
"raw_string": "width"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"number": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,2:9:40-2:12:43",
|
||||
"raw": "200",
|
||||
"value": "200"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"map_key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,3:2:46-3:13:57",
|
||||
"key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,3:2:46-3:8:52",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,3:2:46-3:8:52",
|
||||
"value": [
|
||||
{
|
||||
"string": "height",
|
||||
"raw_string": "height"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"number": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,3:10:54-3:13:57",
|
||||
"raw": "200",
|
||||
"value": "200"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"map_key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,4:2:60-4:17:75",
|
||||
"key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,4:2:60-4:9:67",
|
||||
"path": [
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,4:2:60-4:9:67",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,4:11:69-4:17:75",
|
||||
"value": [
|
||||
{
|
||||
"string": "string",
|
||||
"raw_string": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"map_key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,5:2:78-5:16:92",
|
||||
"key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,5:2:78-5:8:84",
|
||||
"path": [
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,5:2:78-5:8:84",
|
||||
"value": [
|
||||
{
|
||||
"string": "icon",
|
||||
"raw_string": "icon"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,5:10:86-5:16:92",
|
||||
"value": [
|
||||
{
|
||||
"string": "string",
|
||||
"raw_string": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"map_key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,6:2:95-6:14:107",
|
||||
"key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,6:2:95-6:9:102",
|
||||
"path": [
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,6:2:95-6:9:102",
|
||||
"value": [
|
||||
{
|
||||
"string": "width",
|
||||
"raw_string": "width"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,6:11:104-6:14:107",
|
||||
"value": [
|
||||
{
|
||||
"string": "int",
|
||||
"raw_string": "int"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"map_key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,7:2:110-7:15:123",
|
||||
"key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,7:2:110-7:10:118",
|
||||
"path": [
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,7:2:110-7:10:118",
|
||||
"value": [
|
||||
{
|
||||
"string": "height",
|
||||
"raw_string": "height"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,7:12:120-7:15:123",
|
||||
"value": [
|
||||
{
|
||||
"string": "int",
|
||||
"raw_string": "int"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"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": "my_table",
|
||||
"id_val": "my_table",
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,0:0:0-0:8:8",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/2.d2,0:0:0-0:8:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "my_table",
|
||||
"raw_string": "my_table"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path_index": 0,
|
||||
"map_key_edge_index": -1
|
||||
}
|
||||
],
|
||||
"sql_table": {
|
||||
"columns": [
|
||||
{
|
||||
"name": {
|
||||
"label": "shape",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 0,
|
||||
"labelHeight": 0
|
||||
},
|
||||
"type": {
|
||||
"label": "string",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 0,
|
||||
"labelHeight": 0
|
||||
},
|
||||
"constraint": null,
|
||||
"reference": ""
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"label": "icon",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 0,
|
||||
"labelHeight": 0
|
||||
},
|
||||
"type": {
|
||||
"label": "string",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 0,
|
||||
"labelHeight": 0
|
||||
},
|
||||
"constraint": null,
|
||||
"reference": ""
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"label": "width",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 0,
|
||||
"labelHeight": 0
|
||||
},
|
||||
"type": {
|
||||
"label": "int",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 0,
|
||||
"labelHeight": 0
|
||||
},
|
||||
"constraint": null,
|
||||
"reference": ""
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"label": "height",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 0,
|
||||
"labelHeight": 0
|
||||
},
|
||||
"type": {
|
||||
"label": "int",
|
||||
"fontSize": 0,
|
||||
"fontFamily": "",
|
||||
"language": "",
|
||||
"color": "",
|
||||
"italic": false,
|
||||
"bold": false,
|
||||
"underline": false,
|
||||
"labelWidth": 0,
|
||||
"labelHeight": 0
|
||||
},
|
||||
"constraint": null,
|
||||
"reference": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": "my_table"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"width": {
|
||||
"value": "200"
|
||||
},
|
||||
"height": {
|
||||
"value": "200"
|
||||
},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
"value": "sql_table"
|
||||
},
|
||||
"direction": {
|
||||
"value": ""
|
||||
},
|
||||
"constraint": null
|
||||
},
|
||||
"zIndex": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"err": null
|
||||
}
|
||||
236
testdata/d2compiler/TestCompile/reserved_quoted/3.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,236 @@
|
|||
{
|
||||
"graph": {
|
||||
"name": "",
|
||||
"isFolderOnly": false,
|
||||
"ast": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,0:0:0-2:2:14",
|
||||
"nodes": [
|
||||
{
|
||||
"map_key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,0:0:0-0:9:9",
|
||||
"key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,0:0:0-0:9:9",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "*",
|
||||
"raw_string": "*"
|
||||
}
|
||||
],
|
||||
"pattern": [
|
||||
"*"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,0:2:2-0:9:9",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"map_key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,1:0:10-1:1:11",
|
||||
"key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,1:0:10-1:1:11",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,1:0:10-1:1:11",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"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": "shape",
|
||||
"id_val": "shape",
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,0:0:0-0:9:9",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "*",
|
||||
"raw_string": "*"
|
||||
}
|
||||
],
|
||||
"pattern": [
|
||||
"*"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,0:2:2-0:9:9",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path_index": 1,
|
||||
"map_key_edge_index": -1
|
||||
},
|
||||
{
|
||||
"key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,0:0:0-0:9:9",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "*",
|
||||
"raw_string": "*"
|
||||
}
|
||||
],
|
||||
"pattern": [
|
||||
"*"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,0:2:2-0:9:9",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path_index": 1,
|
||||
"map_key_edge_index": -1
|
||||
}
|
||||
],
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": "shape"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
"value": "rectangle"
|
||||
},
|
||||
"direction": {
|
||||
"value": ""
|
||||
},
|
||||
"constraint": null
|
||||
},
|
||||
"zIndex": 0
|
||||
},
|
||||
{
|
||||
"id": "x",
|
||||
"id_val": "x",
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,1:0:10-1:1:11",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/3.d2,1:0:10-1:1:11",
|
||||
"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": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
"value": "rectangle"
|
||||
},
|
||||
"direction": {
|
||||
"value": ""
|
||||
},
|
||||
"constraint": null
|
||||
},
|
||||
"zIndex": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"err": null
|
||||
}
|
||||
284
testdata/d2compiler/TestCompile/reserved_quoted/4.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,284 @@
|
|||
{
|
||||
"graph": {
|
||||
"name": "",
|
||||
"isFolderOnly": false,
|
||||
"ast": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/4.d2,0:0:0-0:16:16",
|
||||
"nodes": [
|
||||
{
|
||||
"map_key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/4.d2,0:0:0-0:16:16",
|
||||
"key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/4.d2,0:0:0-0:16:16",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/4.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/4.d2,0:2:2-0:9:9",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/4.d2,0:10:10-0:16:16",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"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/TestCompile/reserved_quoted/4.d2,0:0:0-0:16:16",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/4.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/4.d2,0:2:2-0:9:9",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/4.d2,0:10:10-0:16:16",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path_index": 0,
|
||||
"map_key_edge_index": -1
|
||||
}
|
||||
],
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": "x"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
"value": "rectangle"
|
||||
},
|
||||
"direction": {
|
||||
"value": ""
|
||||
},
|
||||
"constraint": null
|
||||
},
|
||||
"zIndex": 0
|
||||
},
|
||||
{
|
||||
"id": "style",
|
||||
"id_val": "style",
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/4.d2,0:0:0-0:16:16",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/4.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/4.d2,0:2:2-0:9:9",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/4.d2,0:10:10-0:16:16",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path_index": 1,
|
||||
"map_key_edge_index": -1
|
||||
}
|
||||
],
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": "style"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
"value": "rectangle"
|
||||
},
|
||||
"direction": {
|
||||
"value": ""
|
||||
},
|
||||
"constraint": null
|
||||
},
|
||||
"zIndex": 0
|
||||
},
|
||||
{
|
||||
"id": "fill",
|
||||
"id_val": "fill",
|
||||
"references": [
|
||||
{
|
||||
"key": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/4.d2,0:0:0-0:16:16",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/4.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/4.d2,0:2:2-0:9:9",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "d2/testdata/d2compiler/TestCompile/reserved_quoted/4.d2,0:10:10-0:16:16",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path_index": 2,
|
||||
"map_key_edge_index": -1
|
||||
}
|
||||
],
|
||||
"attributes": {
|
||||
"label": {
|
||||
"value": "fill"
|
||||
},
|
||||
"labelDimensions": {
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"style": {},
|
||||
"near_key": null,
|
||||
"shape": {
|
||||
"value": "rectangle"
|
||||
},
|
||||
"direction": {
|
||||
"value": ""
|
||||
},
|
||||
"constraint": null
|
||||
},
|
||||
"zIndex": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"err": null
|
||||
}
|
||||
30
testdata/d2compiler/TestCompile/spread-import-link.exp.json
generated
vendored
|
|
@ -194,10 +194,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "a"
|
||||
"string": "a",
|
||||
"raw_string": "a"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -217,10 +218,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,0:2:2-0:6:6",
|
||||
"value": [
|
||||
{
|
||||
"string": "link"
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -253,10 +255,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,1:0:17-1:6:23",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers"
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -276,10 +279,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,2:2:29-2:3:30",
|
||||
"value": [
|
||||
{
|
||||
"string": "b"
|
||||
"string": "b",
|
||||
"raw_string": "b"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -299,10 +303,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,3:4:38-3:5:39",
|
||||
"value": [
|
||||
{
|
||||
"string": "d"
|
||||
"string": "d",
|
||||
"raw_string": "d"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -425,10 +430,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile/x.d2,3:4:38-3:5:39",
|
||||
"value": [
|
||||
{
|
||||
"string": "d"
|
||||
"string": "d",
|
||||
"raw_string": "d"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
15
testdata/d2compiler/TestCompile2/boards/board-label-primary.exp.json
generated
vendored
|
|
@ -292,10 +292,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/board-label-primary.d2,3:4:28-3:6:30",
|
||||
"value": [
|
||||
{
|
||||
"string": "RJ"
|
||||
"string": "RJ",
|
||||
"raw_string": "RJ"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -394,10 +395,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/board-label-primary.d2,6:4:46-6:9:51",
|
||||
"value": [
|
||||
{
|
||||
"string": "label"
|
||||
"string": "label",
|
||||
"raw_string": "label"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -426,10 +428,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/board-label-primary.d2,7:4:61-7:6:63",
|
||||
"value": [
|
||||
{
|
||||
"string": "RJ"
|
||||
"string": "RJ",
|
||||
"raw_string": "RJ"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
10
testdata/d2compiler/TestCompile2/boards/isFolderOnly-shapes.exp.json
generated
vendored
|
|
@ -161,10 +161,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/isFolderOnly-shapes.d2,1:0:1-1:9:10",
|
||||
"value": [
|
||||
{
|
||||
"string": "direction"
|
||||
"string": "direction",
|
||||
"raw_string": "direction"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -193,10 +194,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/isFolderOnly-shapes.d2,5:4:39-5:6:41",
|
||||
"value": [
|
||||
{
|
||||
"string": "RJ"
|
||||
"string": "RJ",
|
||||
"raw_string": "RJ"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
65
testdata/d2compiler/TestCompile2/boards/isFolderOnly.exp.json
generated
vendored
|
|
@ -332,10 +332,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/isFolderOnly.d2,3:4:24-3:9:29",
|
||||
"value": [
|
||||
{
|
||||
"string": "santa"
|
||||
"string": "santa",
|
||||
"raw_string": "santa"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -434,10 +435,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/isFolderOnly.d2,6:4:47-6:10:53",
|
||||
"value": [
|
||||
{
|
||||
"string": "clause"
|
||||
"string": "clause",
|
||||
"raw_string": "clause"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -456,10 +458,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/isFolderOnly.d2,7:2:56-7:11:65",
|
||||
"value": [
|
||||
{
|
||||
"string": "scenarios"
|
||||
"string": "scenarios",
|
||||
"raw_string": "scenarios"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -479,10 +482,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/isFolderOnly.d2,8:3:72-8:11:80",
|
||||
"value": [
|
||||
{
|
||||
"string": "seinfeld"
|
||||
"string": "seinfeld",
|
||||
"raw_string": "seinfeld"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -502,10 +506,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/isFolderOnly.d2,6:4:47-6:10:53",
|
||||
"value": [
|
||||
{
|
||||
"string": "clause"
|
||||
"string": "clause",
|
||||
"raw_string": "clause"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -529,10 +534,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/isFolderOnly.d2,10:3:92-10:11:100",
|
||||
"value": [
|
||||
{
|
||||
"string": "missoula"
|
||||
"string": "missoula",
|
||||
"raw_string": "missoula"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -552,10 +558,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/isFolderOnly.d2,6:4:47-6:10:53",
|
||||
"value": [
|
||||
{
|
||||
"string": "clause"
|
||||
"string": "clause",
|
||||
"raw_string": "clause"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -574,10 +581,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/isFolderOnly.d2,11:4:108-11:9:113",
|
||||
"value": [
|
||||
{
|
||||
"string": "steps"
|
||||
"string": "steps",
|
||||
"raw_string": "steps"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -597,10 +605,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/isFolderOnly.d2,12:5:122-12:11:128",
|
||||
"value": [
|
||||
{
|
||||
"string": "missus"
|
||||
"string": "missus",
|
||||
"raw_string": "missus"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -724,10 +733,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/isFolderOnly.d2,6:4:47-6:10:53",
|
||||
"value": [
|
||||
{
|
||||
"string": "clause"
|
||||
"string": "clause",
|
||||
"raw_string": "clause"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -826,10 +836,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/isFolderOnly.d2,6:4:47-6:10:53",
|
||||
"value": [
|
||||
{
|
||||
"string": "clause"
|
||||
"string": "clause",
|
||||
"raw_string": "clause"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -848,10 +859,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/isFolderOnly.d2,11:4:108-11:9:113",
|
||||
"value": [
|
||||
{
|
||||
"string": "steps"
|
||||
"string": "steps",
|
||||
"raw_string": "steps"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -871,10 +883,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/isFolderOnly.d2,12:5:122-12:11:128",
|
||||
"value": [
|
||||
{
|
||||
"string": "missus"
|
||||
"string": "missus",
|
||||
"raw_string": "missus"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
5
testdata/d2compiler/TestCompile2/boards/no-inherit-label.exp.json
generated
vendored
|
|
@ -161,10 +161,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/no-inherit-label.d2,5:4:32-5:6:34",
|
||||
"value": [
|
||||
{
|
||||
"string": "RJ"
|
||||
"string": "RJ",
|
||||
"raw_string": "RJ"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
75
testdata/d2compiler/TestCompile2/boards/recursive.exp.json
generated
vendored
|
|
@ -382,10 +382,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/recursive.d2,4:4:29-4:9:34",
|
||||
"value": [
|
||||
{
|
||||
"string": "santa"
|
||||
"string": "santa",
|
||||
"raw_string": "santa"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -484,10 +485,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/recursive.d2,7:4:52-7:10:58",
|
||||
"value": [
|
||||
{
|
||||
"string": "clause"
|
||||
"string": "clause",
|
||||
"raw_string": "clause"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -506,10 +508,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/recursive.d2,8:2:61-8:7:66",
|
||||
"value": [
|
||||
{
|
||||
"string": "steps"
|
||||
"string": "steps",
|
||||
"raw_string": "steps"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -529,10 +532,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/recursive.d2,9:3:73-9:11:81",
|
||||
"value": [
|
||||
{
|
||||
"string": "seinfeld"
|
||||
"string": "seinfeld",
|
||||
"raw_string": "seinfeld"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -552,10 +556,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/recursive.d2,7:4:52-7:10:58",
|
||||
"value": [
|
||||
{
|
||||
"string": "clause"
|
||||
"string": "clause",
|
||||
"raw_string": "clause"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -574,10 +579,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/recursive.d2,10:4:89-10:12:97",
|
||||
"value": [
|
||||
{
|
||||
"string": "reindeer"
|
||||
"string": "reindeer",
|
||||
"raw_string": "reindeer"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -601,10 +607,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/recursive.d2,12:3:106-12:11:114",
|
||||
"value": [
|
||||
{
|
||||
"string": "missoula"
|
||||
"string": "missoula",
|
||||
"raw_string": "missoula"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -624,10 +631,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/recursive.d2,7:4:52-7:10:58",
|
||||
"value": [
|
||||
{
|
||||
"string": "clause"
|
||||
"string": "clause",
|
||||
"raw_string": "clause"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -646,10 +654,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/recursive.d2,10:4:89-10:12:97",
|
||||
"value": [
|
||||
{
|
||||
"string": "reindeer"
|
||||
"string": "reindeer",
|
||||
"raw_string": "reindeer"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -668,10 +677,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/recursive.d2,13:4:122-13:11:129",
|
||||
"value": [
|
||||
{
|
||||
"string": "montana"
|
||||
"string": "montana",
|
||||
"raw_string": "montana"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -780,10 +790,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/recursive.d2,7:4:52-7:10:58",
|
||||
"value": [
|
||||
{
|
||||
"string": "clause"
|
||||
"string": "clause",
|
||||
"raw_string": "clause"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -802,10 +813,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/recursive.d2,10:4:89-10:12:97",
|
||||
"value": [
|
||||
{
|
||||
"string": "reindeer"
|
||||
"string": "reindeer",
|
||||
"raw_string": "reindeer"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -949,10 +961,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/recursive.d2,7:4:52-7:10:58",
|
||||
"value": [
|
||||
{
|
||||
"string": "clause"
|
||||
"string": "clause",
|
||||
"raw_string": "clause"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -971,10 +984,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/recursive.d2,10:4:89-10:12:97",
|
||||
"value": [
|
||||
{
|
||||
"string": "reindeer"
|
||||
"string": "reindeer",
|
||||
"raw_string": "reindeer"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -993,10 +1007,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/recursive.d2,13:4:122-13:11:129",
|
||||
"value": [
|
||||
{
|
||||
"string": "montana"
|
||||
"string": "montana",
|
||||
"raw_string": "montana"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
10
testdata/d2compiler/TestCompile2/boards/root.exp.json
generated
vendored
|
|
@ -249,10 +249,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/root.d2,4:4:29-4:9:34",
|
||||
"value": [
|
||||
{
|
||||
"string": "santa"
|
||||
"string": "santa",
|
||||
"raw_string": "santa"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -351,10 +352,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/root.d2,7:4:52-7:10:58",
|
||||
"value": [
|
||||
{
|
||||
"string": "clause"
|
||||
"string": "clause",
|
||||
"raw_string": "clause"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
20
testdata/d2compiler/TestCompile2/boards/scenarios_edge_index.exp.json
generated
vendored
|
|
@ -357,10 +357,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/scenarios_edge_index.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "a"
|
||||
"string": "a",
|
||||
"raw_string": "a"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -379,10 +380,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/scenarios_edge_index.d2,0:5:5-0:6:6",
|
||||
"value": [
|
||||
{
|
||||
"string": "x"
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -446,10 +448,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/scenarios_edge_index.d2,4:16:44-4:21:49",
|
||||
"value": [
|
||||
{
|
||||
"string": "style"
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -469,10 +472,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/scenarios_edge_index.d2,4:22:50-4:29:57",
|
||||
"value": [
|
||||
{
|
||||
"string": "opacity"
|
||||
"string": "opacity",
|
||||
"raw_string": "opacity"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
65
testdata/d2compiler/TestCompile2/boards/style-nested-boards.exp.json
generated
vendored
|
|
@ -454,10 +454,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/style-nested-boards.d2,20:4:139-20:5:140",
|
||||
"value": [
|
||||
{
|
||||
"string": "x"
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -558,10 +559,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/style-nested-boards.d2,4:4:48-4:5:49",
|
||||
"value": [
|
||||
{
|
||||
"string": "x"
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -581,10 +583,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/style-nested-boards.d2,0:3:3-0:8:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "style"
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -604,10 +607,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/style-nested-boards.d2,0:9:9-0:15:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "stroke"
|
||||
"string": "stroke",
|
||||
"raw_string": "stroke"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -730,10 +734,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/style-nested-boards.d2,7:4:65-7:5:66",
|
||||
"value": [
|
||||
{
|
||||
"string": "x"
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -753,10 +758,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/style-nested-boards.d2,0:3:3-0:8:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "style"
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -776,10 +782,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/style-nested-boards.d2,0:9:9-0:15:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "stroke"
|
||||
"string": "stroke",
|
||||
"raw_string": "stroke"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -904,10 +911,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/style-nested-boards.d2,12:4:93-12:5:94",
|
||||
"value": [
|
||||
{
|
||||
"string": "x"
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -927,10 +935,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/style-nested-boards.d2,0:3:3-0:8:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "style"
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -950,10 +959,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/style-nested-boards.d2,0:9:9-0:15:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "stroke"
|
||||
"string": "stroke",
|
||||
"raw_string": "stroke"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1076,10 +1086,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/style-nested-boards.d2,12:4:93-12:5:94",
|
||||
"value": [
|
||||
{
|
||||
"string": "x"
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1099,10 +1110,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/style-nested-boards.d2,0:3:3-0:8:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "style"
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1122,10 +1134,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/boards/style-nested-boards.d2,0:9:9-0:15:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "stroke"
|
||||
"string": "stroke",
|
||||
"raw_string": "stroke"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
15
testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.exp.json
generated
vendored
|
|
@ -446,10 +446,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,11:4:101-11:5:102",
|
||||
"value": [
|
||||
{
|
||||
"string": "a"
|
||||
"string": "a",
|
||||
"raw_string": "a"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -469,10 +470,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,1:4:5-1:9:10",
|
||||
"value": [
|
||||
{
|
||||
"string": "style"
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -492,10 +494,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.d2,1:10:11-1:14:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill"
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
30
testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.exp.json
generated
vendored
|
|
@ -211,10 +211,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,5:4:48-5:5:49",
|
||||
"value": [
|
||||
{
|
||||
"string": "a"
|
||||
"string": "a",
|
||||
"raw_string": "a"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -234,10 +235,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,1:3:4-1:8:9",
|
||||
"value": [
|
||||
{
|
||||
"string": "style"
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -257,10 +259,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,1:9:10-1:13:14",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill"
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -299,10 +302,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,5:9:53-5:10:54",
|
||||
"value": [
|
||||
{
|
||||
"string": "b"
|
||||
"string": "b",
|
||||
"raw_string": "b"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -322,10 +326,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,1:3:4-1:8:9",
|
||||
"value": [
|
||||
{
|
||||
"string": "style"
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -345,10 +350,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.d2,1:9:10-1:13:14",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill"
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
15
testdata/d2compiler/TestCompile2/globs/reapply-scenario.exp.json
generated
vendored
|
|
@ -362,10 +362,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/globs/reapply-scenario.d2,2:0:20-2:1:21",
|
||||
"value": [
|
||||
{
|
||||
"string": "x"
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -385,10 +386,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/globs/reapply-scenario.d2,3:2:27-3:3:28",
|
||||
"value": [
|
||||
{
|
||||
"string": "b"
|
||||
"string": "b",
|
||||
"raw_string": "b"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -408,10 +410,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/globs/reapply-scenario.d2,1:5:6-1:10:11",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape"
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
30
testdata/d2compiler/TestCompile2/globs/second-scenario.exp.json
generated
vendored
|
|
@ -300,10 +300,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/globs/second-scenario.d2,5:4:45-5:5:46",
|
||||
"value": [
|
||||
{
|
||||
"string": "x"
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -323,10 +324,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/globs/second-scenario.d2,6:6:56-6:7:57",
|
||||
"value": [
|
||||
{
|
||||
"string": "b"
|
||||
"string": "b",
|
||||
"raw_string": "b"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -346,10 +348,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/globs/second-scenario.d2,1:5:6-1:10:11",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape"
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -513,10 +516,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/globs/second-scenario.d2,10:4:79-10:5:80",
|
||||
"value": [
|
||||
{
|
||||
"string": "x"
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -536,10 +540,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/globs/second-scenario.d2,11:6:90-11:7:91",
|
||||
"value": [
|
||||
{
|
||||
"string": "b"
|
||||
"string": "b",
|
||||
"raw_string": "b"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -559,10 +564,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/globs/second-scenario.d2,1:5:6-1:10:11",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape"
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
20
testdata/d2compiler/TestCompile2/vars/boards/layer-2.exp.json
generated
vendored
|
|
@ -358,10 +358,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/vars/boards/layer-2.d2,8:4:65-8:8:69",
|
||||
"value": [
|
||||
{
|
||||
"string": "vars"
|
||||
"string": "vars",
|
||||
"raw_string": "vars"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -381,10 +382,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/vars/boards/layer-2.d2,9:6:79-9:7:80",
|
||||
"value": [
|
||||
{
|
||||
"string": "x"
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -418,10 +420,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/vars/boards/layer-2.d2,11:4:104-11:6:106",
|
||||
"value": [
|
||||
{
|
||||
"string": "hi"
|
||||
"string": "hi",
|
||||
"raw_string": "hi"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -450,10 +453,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/vars/boards/layer-2.d2,12:4:117-12:9:122",
|
||||
"value": [
|
||||
{
|
||||
"string": "hello"
|
||||
"string": "hello",
|
||||
"raw_string": "hello"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
5
testdata/d2compiler/TestCompile2/vars/boards/layer.exp.json
generated
vendored
|
|
@ -215,10 +215,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/vars/boards/layer.d2,7:4:47-7:6:49",
|
||||
"value": [
|
||||
{
|
||||
"string": "hi"
|
||||
"string": "hi",
|
||||
"raw_string": "hi"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
45
testdata/d2compiler/TestCompile2/vars/boards/overlay.exp.json
generated
vendored
|
|
@ -541,10 +541,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/vars/boards/overlay.d2,16:4:134-16:8:138",
|
||||
"value": [
|
||||
{
|
||||
"string": "vars"
|
||||
"string": "vars",
|
||||
"raw_string": "vars"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -564,10 +565,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/vars/boards/overlay.d2,17:6:148-17:7:149",
|
||||
"value": [
|
||||
{
|
||||
"string": "y"
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -601,10 +603,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/vars/boards/overlay.d2,19:4:170-19:5:171",
|
||||
"value": [
|
||||
{
|
||||
"string": "x"
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -633,10 +636,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/vars/boards/overlay.d2,20:4:182-20:5:183",
|
||||
"value": [
|
||||
{
|
||||
"string": "y"
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -792,10 +796,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/vars/boards/overlay.d2,1:0:1-1:4:5",
|
||||
"value": [
|
||||
{
|
||||
"string": "vars"
|
||||
"string": "vars",
|
||||
"raw_string": "vars"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -815,10 +820,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/vars/boards/overlay.d2,2:2:11-2:3:12",
|
||||
"value": [
|
||||
{
|
||||
"string": "x"
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -847,10 +853,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/vars/boards/overlay.d2,8:6:64-8:7:65",
|
||||
"value": [
|
||||
{
|
||||
"string": "y"
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -884,10 +891,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/vars/boards/overlay.d2,10:4:86-10:5:87",
|
||||
"value": [
|
||||
{
|
||||
"string": "x"
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -916,10 +924,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/vars/boards/overlay.d2,11:4:98-11:5:99",
|
||||
"value": [
|
||||
{
|
||||
"string": "y"
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
15
testdata/d2compiler/TestCompile2/vars/boards/replace.exp.json
generated
vendored
|
|
@ -277,10 +277,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/vars/boards/replace.d2,1:0:1-1:4:5",
|
||||
"value": [
|
||||
{
|
||||
"string": "vars"
|
||||
"string": "vars",
|
||||
"raw_string": "vars"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -300,10 +301,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/vars/boards/replace.d2,2:2:11-2:3:12",
|
||||
"value": [
|
||||
{
|
||||
"string": "x"
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -337,10 +339,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/vars/boards/replace.d2,10:4:95-10:5:96",
|
||||
"value": [
|
||||
{
|
||||
"string": "x"
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
15
testdata/d2compiler/TestCompile2/vars/boards/scenario.exp.json
generated
vendored
|
|
@ -215,10 +215,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/vars/boards/scenario.d2,1:0:1-1:4:5",
|
||||
"value": [
|
||||
{
|
||||
"string": "vars"
|
||||
"string": "vars",
|
||||
"raw_string": "vars"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -238,10 +239,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/vars/boards/scenario.d2,2:2:11-2:3:12",
|
||||
"value": [
|
||||
{
|
||||
"string": "x"
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -275,10 +277,11 @@
|
|||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
"range": "d2/testdata/d2compiler/TestCompile2/vars/boards/scenario.d2,7:4:50-7:6:52",
|
||||
"value": [
|
||||
{
|
||||
"string": "hi"
|
||||
"string": "hi",
|
||||
"raw_string": "hi"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
50
testdata/d2ir/TestCompile/classes/basic.exp.json
generated
vendored
|
|
@ -1,7 +1,15 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/basic.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -59,19 +67,51 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "classes",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/basic.d2,1:0:2-1:7:9",
|
||||
"value": [
|
||||
{
|
||||
"string": "classes",
|
||||
"raw_string": "classes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "mango",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/basic.d2,2:2:15-2:7:20",
|
||||
"value": [
|
||||
{
|
||||
"string": "mango",
|
||||
"raw_string": "mango"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/basic.d2,3:4:28-3:9:33",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/basic.d2,3:10:34-3:14:38",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/basic.d2,3:16:40-3:22:46",
|
||||
|
|
|
|||
600
testdata/d2ir/TestCompile/classes/inherited.exp.json
generated
vendored
|
|
@ -1,19 +1,51 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "classes",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7",
|
||||
"value": [
|
||||
{
|
||||
"string": "classes",
|
||||
"raw_string": "classes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "mango",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18",
|
||||
"value": [
|
||||
{
|
||||
"string": "mango",
|
||||
"raw_string": "mango"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44",
|
||||
|
|
@ -452,27 +484,75 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "scenarios",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,5:0:51-5:9:60",
|
||||
"value": [
|
||||
{
|
||||
"string": "scenarios",
|
||||
"raw_string": "scenarios"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "hawaii",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,6:2:66-6:8:72",
|
||||
"value": [
|
||||
{
|
||||
"string": "hawaii",
|
||||
"raw_string": "hawaii"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "classes",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7",
|
||||
"value": [
|
||||
{
|
||||
"string": "classes",
|
||||
"raw_string": "classes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "mango",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18",
|
||||
"value": [
|
||||
{
|
||||
"string": "mango",
|
||||
"raw_string": "mango"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44",
|
||||
|
|
@ -911,27 +991,75 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "steps",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,7:2:78-7:7:83",
|
||||
"value": [
|
||||
{
|
||||
"string": "steps",
|
||||
"raw_string": "steps"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "1",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,8:6:93-8:7:94",
|
||||
"value": [
|
||||
{
|
||||
"string": "1",
|
||||
"raw_string": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "classes",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7",
|
||||
"value": [
|
||||
{
|
||||
"string": "classes",
|
||||
"raw_string": "classes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "mango",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18",
|
||||
"value": [
|
||||
{
|
||||
"string": "mango",
|
||||
"raw_string": "mango"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44",
|
||||
|
|
@ -1232,15 +1360,39 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "cherry",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133",
|
||||
"value": [
|
||||
{
|
||||
"string": "cherry",
|
||||
"raw_string": "cherry"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164",
|
||||
|
|
@ -1811,7 +1963,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -2059,23 +2219,63 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "2",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,16:6:211-16:7:212",
|
||||
"value": [
|
||||
{
|
||||
"string": "2",
|
||||
"raw_string": "2"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "classes",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7",
|
||||
"value": [
|
||||
{
|
||||
"string": "classes",
|
||||
"raw_string": "classes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "mango",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18",
|
||||
"value": [
|
||||
{
|
||||
"string": "mango",
|
||||
"raw_string": "mango"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44",
|
||||
|
|
@ -2376,15 +2576,39 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "cherry",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133",
|
||||
"value": [
|
||||
{
|
||||
"string": "cherry",
|
||||
"raw_string": "cherry"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/inherited.d2,11:24:161-11:27:164",
|
||||
|
|
@ -2955,7 +3179,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -3013,7 +3245,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225",
|
||||
"value": [
|
||||
{
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -3159,23 +3399,63 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "3",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,19:6:240-19:7:241",
|
||||
"value": [
|
||||
{
|
||||
"string": "3",
|
||||
"raw_string": "3"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "classes",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7",
|
||||
"value": [
|
||||
{
|
||||
"string": "classes",
|
||||
"raw_string": "classes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "mango",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18",
|
||||
"value": [
|
||||
{
|
||||
"string": "mango",
|
||||
"raw_string": "mango"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44",
|
||||
|
|
@ -3476,15 +3756,39 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "cherry",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133",
|
||||
"value": [
|
||||
{
|
||||
"string": "cherry",
|
||||
"raw_string": "cherry"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312",
|
||||
|
|
@ -4460,7 +4764,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -4518,7 +4830,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225",
|
||||
"value": [
|
||||
{
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -4819,23 +5139,63 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "4",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,27:6:359-27:7:360",
|
||||
"value": [
|
||||
{
|
||||
"string": "4",
|
||||
"raw_string": "4"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "classes",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7",
|
||||
"value": [
|
||||
{
|
||||
"string": "classes",
|
||||
"raw_string": "classes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "mango",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18",
|
||||
"value": [
|
||||
{
|
||||
"string": "mango",
|
||||
"raw_string": "mango"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44",
|
||||
|
|
@ -5136,15 +5496,39 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "cherry",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133",
|
||||
"value": [
|
||||
{
|
||||
"string": "cherry",
|
||||
"raw_string": "cherry"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312",
|
||||
|
|
@ -6120,7 +6504,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,14:8:195-14:9:196",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -6231,7 +6623,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,17:8:224-17:9:225",
|
||||
"value": [
|
||||
{
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -6342,15 +6742,39 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "layers",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,28:8:372-28:14:378",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "deep",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,29:10:392-29:14:396",
|
||||
"value": [
|
||||
{
|
||||
"string": "deep",
|
||||
"raw_string": "deep"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,30:12:412-30:13:413",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -6408,19 +6832,51 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "classes",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,0:0:0-0:7:7",
|
||||
"value": [
|
||||
{
|
||||
"string": "classes",
|
||||
"raw_string": "classes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "mango",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,1:2:13-1:7:18",
|
||||
"value": [
|
||||
{
|
||||
"string": "mango",
|
||||
"raw_string": "mango"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,2:4:26-2:9:31",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,2:10:32-2:14:36",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/inherited.d2,2:16:38-2:22:44",
|
||||
|
|
@ -6721,15 +7177,39 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "cherry",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,10:10:127-10:16:133",
|
||||
"value": [
|
||||
{
|
||||
"string": "cherry",
|
||||
"raw_string": "cherry"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,11:12:149-11:17:154",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/inherited.d2,11:18:155-11:22:159",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/inherited.d2,22:24:308-22:28:312",
|
||||
|
|
|
|||
110
testdata/d2ir/TestCompile/classes/layer-modify.exp.json
generated
vendored
|
|
@ -1,19 +1,51 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "classes",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/layer-modify.d2,0:0:0-0:7:7",
|
||||
"value": [
|
||||
{
|
||||
"string": "classes",
|
||||
"raw_string": "classes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "orb",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/layer-modify.d2,1:2:13-1:5:16",
|
||||
"value": [
|
||||
{
|
||||
"string": "orb",
|
||||
"raw_string": "orb"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/layer-modify.d2,2:4:24-2:9:29",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/layer-modify.d2,2:10:30-2:14:34",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/layer-modify.d2,2:16:36-2:22:42",
|
||||
|
|
@ -452,27 +484,75 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "layers",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/layer-modify.d2,5:0:49-5:6:55",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/layer-modify.d2,6:2:61-6:3:62",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "classes",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/layer-modify.d2,0:0:0-0:7:7",
|
||||
"value": [
|
||||
{
|
||||
"string": "classes",
|
||||
"raw_string": "classes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "orb",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/layer-modify.d2,1:2:13-1:5:16",
|
||||
"value": [
|
||||
{
|
||||
"string": "orb",
|
||||
"raw_string": "orb"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/layer-modify.d2,2:4:24-2:9:29",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/layer-modify.d2,2:10:30-2:14:34",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/layer-modify.d2,2:16:36-2:22:42",
|
||||
|
|
@ -573,7 +653,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "stroke",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/layer-modify.d2,7:22:88-7:28:94",
|
||||
"value": [
|
||||
{
|
||||
"string": "stroke",
|
||||
"raw_string": "stroke"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/layer-modify.d2,7:30:96-7:33:99",
|
||||
|
|
|
|||
120
testdata/d2ir/TestCompile/classes/merge.exp.json
generated
vendored
|
|
@ -1,19 +1,51 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "classes",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/merge.d2,0:0:0-0:7:7",
|
||||
"value": [
|
||||
{
|
||||
"string": "classes",
|
||||
"raw_string": "classes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "mango",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/merge.d2,1:2:13-1:7:18",
|
||||
"value": [
|
||||
{
|
||||
"string": "mango",
|
||||
"raw_string": "mango"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/merge.d2,2:4:26-2:9:31",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/merge.d2,2:10:32-2:14:36",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/merge.d2,2:16:38-2:22:44",
|
||||
|
|
@ -205,7 +237,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "width",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/merge.d2,3:2:47-3:7:52",
|
||||
"value": [
|
||||
{
|
||||
"string": "width",
|
||||
"raw_string": "width"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/merge.d2,3:9:54-3:11:56",
|
||||
|
|
@ -581,27 +621,75 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "layers",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/merge.d2,6:0:63-6:6:69",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "hawaii",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/merge.d2,7:2:75-7:8:81",
|
||||
"value": [
|
||||
{
|
||||
"string": "hawaii",
|
||||
"raw_string": "hawaii"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "classes",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/merge.d2,0:0:0-0:7:7",
|
||||
"value": [
|
||||
{
|
||||
"string": "classes",
|
||||
"raw_string": "classes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "mango",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/merge.d2,1:2:13-1:7:18",
|
||||
"value": [
|
||||
{
|
||||
"string": "mango",
|
||||
"raw_string": "mango"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/merge.d2,2:4:26-2:9:31",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/merge.d2,2:10:32-2:14:36",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/merge.d2,2:16:38-2:22:44",
|
||||
|
|
@ -793,7 +881,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "width",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/merge.d2,3:2:47-3:7:52",
|
||||
"value": [
|
||||
{
|
||||
"string": "width",
|
||||
"raw_string": "width"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/merge.d2,10:15:130-10:19:134",
|
||||
|
|
|
|||
170
testdata/d2ir/TestCompile/classes/nested.exp.json
generated
vendored
|
|
@ -1,19 +1,51 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "classes",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/nested.d2,0:0:0-0:7:7",
|
||||
"value": [
|
||||
{
|
||||
"string": "classes",
|
||||
"raw_string": "classes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "mango",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/nested.d2,1:2:13-1:7:18",
|
||||
"value": [
|
||||
{
|
||||
"string": "mango",
|
||||
"raw_string": "mango"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/nested.d2,2:4:26-2:9:31",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/nested.d2,2:10:32-2:14:36",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/nested.d2,2:16:38-2:22:44",
|
||||
|
|
@ -452,23 +484,63 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "layers",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/nested.d2,5:0:51-5:6:57",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "hawaii",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/nested.d2,6:2:63-6:8:69",
|
||||
"value": [
|
||||
{
|
||||
"string": "hawaii",
|
||||
"raw_string": "hawaii"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "layers",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/nested.d2,7:2:75-7:8:81",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "maui",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/nested.d2,8:6:91-8:10:95",
|
||||
"value": [
|
||||
{
|
||||
"string": "maui",
|
||||
"raw_string": "maui"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/nested.d2,9:8:107-9:9:108",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -526,19 +598,51 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "classes",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/nested.d2,0:0:0-0:7:7",
|
||||
"value": [
|
||||
{
|
||||
"string": "classes",
|
||||
"raw_string": "classes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "mango",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/nested.d2,1:2:13-1:7:18",
|
||||
"value": [
|
||||
{
|
||||
"string": "mango",
|
||||
"raw_string": "mango"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/nested.d2,2:4:26-2:9:31",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/nested.d2,2:10:32-2:14:36",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/nested.d2,2:16:38-2:22:44",
|
||||
|
|
@ -1182,19 +1286,51 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "classes",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/nested.d2,0:0:0-0:7:7",
|
||||
"value": [
|
||||
{
|
||||
"string": "classes",
|
||||
"raw_string": "classes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "mango",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/nested.d2,1:2:13-1:7:18",
|
||||
"value": [
|
||||
{
|
||||
"string": "mango",
|
||||
"raw_string": "mango"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/nested.d2,2:4:26-2:9:31",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/classes/nested.d2,2:10:32-2:14:36",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/classes/nested.d2,2:16:38-2:22:44",
|
||||
|
|
|
|||
100
testdata/d2ir/TestCompile/edges/chain.exp.json
generated
vendored
|
|
@ -1,7 +1,15 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "a",
|
||||
"name": {
|
||||
"range": "TestCompile/edges/chain.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "a",
|
||||
"raw_string": "a"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -192,7 +200,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "b",
|
||||
"name": {
|
||||
"range": "TestCompile/edges/chain.d2,0:5:5-0:6:6",
|
||||
"value": [
|
||||
{
|
||||
"string": "b",
|
||||
"raw_string": "b"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -569,7 +585,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "c",
|
||||
"name": {
|
||||
"range": "TestCompile/edges/chain.d2,0:10:10-0:11:11",
|
||||
"value": [
|
||||
{
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -946,7 +970,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "d",
|
||||
"name": {
|
||||
"range": "TestCompile/edges/chain.d2,0:15:15-0:16:16",
|
||||
"value": [
|
||||
{
|
||||
"string": "d",
|
||||
"raw_string": "d"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -1141,11 +1173,27 @@
|
|||
{
|
||||
"edge_id": {
|
||||
"src_path": [
|
||||
"a"
|
||||
{
|
||||
"range": "TestCompile/edges/chain.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "a",
|
||||
"raw_string": "a"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"src_arrow": false,
|
||||
"dst_path": [
|
||||
"b"
|
||||
{
|
||||
"range": "TestCompile/edges/chain.d2,0:5:5-0:6:6",
|
||||
"value": [
|
||||
{
|
||||
"string": "b",
|
||||
"raw_string": "b"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"dst_arrow": true,
|
||||
"index": 0,
|
||||
|
|
@ -1318,11 +1366,27 @@
|
|||
{
|
||||
"edge_id": {
|
||||
"src_path": [
|
||||
"b"
|
||||
{
|
||||
"range": "TestCompile/edges/chain.d2,0:5:5-0:6:6",
|
||||
"value": [
|
||||
{
|
||||
"string": "b",
|
||||
"raw_string": "b"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"src_arrow": false,
|
||||
"dst_path": [
|
||||
"c"
|
||||
{
|
||||
"range": "TestCompile/edges/chain.d2,0:10:10-0:11:11",
|
||||
"value": [
|
||||
{
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"dst_arrow": true,
|
||||
"index": 0,
|
||||
|
|
@ -1495,11 +1559,27 @@
|
|||
{
|
||||
"edge_id": {
|
||||
"src_path": [
|
||||
"c"
|
||||
{
|
||||
"range": "TestCompile/edges/chain.d2,0:10:10-0:11:11",
|
||||
"value": [
|
||||
{
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"src_arrow": false,
|
||||
"dst_path": [
|
||||
"d"
|
||||
{
|
||||
"range": "TestCompile/edges/chain.d2,0:15:15-0:16:16",
|
||||
"value": [
|
||||
{
|
||||
"string": "d",
|
||||
"raw_string": "d"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"dst_arrow": true,
|
||||
"index": 0,
|
||||
|
|
|
|||
80
testdata/d2ir/TestCompile/edges/nested.exp.json
generated
vendored
|
|
@ -1,11 +1,27 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "TestCompile/edges/nested.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "y",
|
||||
"name": {
|
||||
"range": "TestCompile/edges/nested.d2,0:2:2-0:3:3",
|
||||
"value": [
|
||||
{
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -350,11 +366,27 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "z",
|
||||
"name": {
|
||||
"range": "TestCompile/edges/nested.d2,0:7:7-0:8:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "z",
|
||||
"raw_string": "z"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "p",
|
||||
"name": {
|
||||
"range": "TestCompile/edges/nested.d2,0:9:9-0:10:10",
|
||||
"value": [
|
||||
{
|
||||
"string": "p",
|
||||
"raw_string": "p"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -703,13 +735,45 @@
|
|||
{
|
||||
"edge_id": {
|
||||
"src_path": [
|
||||
"x",
|
||||
"y"
|
||||
{
|
||||
"range": "TestCompile/edges/nested.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"range": "TestCompile/edges/nested.d2,0:2:2-0:3:3",
|
||||
"value": [
|
||||
{
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"src_arrow": false,
|
||||
"dst_path": [
|
||||
"z",
|
||||
"p"
|
||||
{
|
||||
"range": "TestCompile/edges/nested.d2,0:7:7-0:8:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "z",
|
||||
"raw_string": "z"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"range": "TestCompile/edges/nested.d2,0:9:9-0:10:10",
|
||||
"value": [
|
||||
{
|
||||
"string": "p",
|
||||
"raw_string": "p"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"dst_arrow": true,
|
||||
"index": 0,
|
||||
|
|
|
|||
40
testdata/d2ir/TestCompile/edges/root.exp.json
generated
vendored
|
|
@ -1,7 +1,15 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "TestCompile/edges/root.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -118,7 +126,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"name": {
|
||||
"range": "TestCompile/edges/root.d2,0:5:5-0:6:6",
|
||||
"value": [
|
||||
{
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -239,11 +255,27 @@
|
|||
{
|
||||
"edge_id": {
|
||||
"src_path": [
|
||||
"x"
|
||||
{
|
||||
"range": "TestCompile/edges/root.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"src_arrow": false,
|
||||
"dst_path": [
|
||||
"y"
|
||||
{
|
||||
"range": "TestCompile/edges/root.d2,0:5:5-0:6:6",
|
||||
"value": [
|
||||
{
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"dst_arrow": true,
|
||||
"index": 0,
|
||||
|
|
|
|||
60
testdata/d2ir/TestCompile/edges/underscore.exp.json
generated
vendored
|
|
@ -1,11 +1,27 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "p",
|
||||
"name": {
|
||||
"range": "TestCompile/edges/underscore.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "p",
|
||||
"raw_string": "p"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "z",
|
||||
"name": {
|
||||
"range": "TestCompile/edges/underscore.d2,0:12:12-0:13:13",
|
||||
"value": [
|
||||
{
|
||||
"string": "z",
|
||||
"raw_string": "z"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -266,7 +282,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "TestCompile/edges/underscore.d2,0:7:7-0:8:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -420,12 +444,36 @@
|
|||
{
|
||||
"edge_id": {
|
||||
"src_path": [
|
||||
"x"
|
||||
{
|
||||
"range": "TestCompile/edges/underscore.d2,0:7:7-0:8:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"src_arrow": false,
|
||||
"dst_path": [
|
||||
"p",
|
||||
"z"
|
||||
{
|
||||
"range": "TestCompile/edges/underscore.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "p",
|
||||
"raw_string": "p"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"range": "TestCompile/edges/underscore.d2,0:12:12-0:13:13",
|
||||
"value": [
|
||||
{
|
||||
"string": "z",
|
||||
"raw_string": "z"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"dst_arrow": true,
|
||||
"index": 0,
|
||||
|
|
|
|||
10
testdata/d2ir/TestCompile/fields/array.exp.json
generated
vendored
|
|
@ -1,7 +1,15 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "TestCompile/fields/array.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"values": [
|
||||
{
|
||||
|
|
|
|||
10
testdata/d2ir/TestCompile/fields/label.exp.json
generated
vendored
|
|
@ -1,7 +1,15 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "TestCompile/fields/label.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/fields/label.d2,0:3:3-0:6:6",
|
||||
|
|
|
|||
20
testdata/d2ir/TestCompile/fields/nested.exp.json
generated
vendored
|
|
@ -1,11 +1,27 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "TestCompile/fields/nested.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "y",
|
||||
"name": {
|
||||
"range": "TestCompile/fields/nested.d2,0:2:2-0:3:3",
|
||||
"value": [
|
||||
{
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/fields/nested.d2,0:5:5-0:8:8",
|
||||
|
|
|
|||
30
testdata/d2ir/TestCompile/fields/primary/nested.exp.json
generated
vendored
|
|
@ -1,11 +1,27 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "TestCompile/fields/primary/nested.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "y",
|
||||
"name": {
|
||||
"range": "TestCompile/fields/primary/nested.d2,0:2:2-0:3:3",
|
||||
"value": [
|
||||
{
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/fields/primary/nested.d2,0:5:5-0:8:8",
|
||||
|
|
@ -20,7 +36,15 @@
|
|||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "pqrs",
|
||||
"name": {
|
||||
"range": "TestCompile/fields/primary/nested.d2,0:11:11-0:15:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "pqrs",
|
||||
"raw_string": "pqrs"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
|
|||
20
testdata/d2ir/TestCompile/fields/primary/root.exp.json
generated
vendored
|
|
@ -1,7 +1,15 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "TestCompile/fields/primary/root.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/fields/primary/root.d2,0:3:3-0:6:6",
|
||||
|
|
@ -16,7 +24,15 @@
|
|||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "pqrs",
|
||||
"name": {
|
||||
"range": "TestCompile/fields/primary/root.d2,0:9:9-0:13:13",
|
||||
"value": [
|
||||
{
|
||||
"string": "pqrs",
|
||||
"raw_string": "pqrs"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
|
|||
898
testdata/d2ir/TestCompile/fields/quoted.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,898 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": {
|
||||
"range": "TestCompile/fields/quoted.d2,0:0:0-0:8:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "my_table",
|
||||
"raw_string": "my_table"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": {
|
||||
"range": "TestCompile/fields/quoted.d2,1:2:14-1:7:19",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/fields/quoted.d2,1:9:21-1:18:30",
|
||||
"value": [
|
||||
{
|
||||
"string": "sql_table",
|
||||
"raw_string": "sql_table"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/fields/quoted.d2,1:2:14-1:7:19",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/fields/quoted.d2,1:2:14-1:7:19",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,1:2:14-1:7:19",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,1:2:14-1:18:30",
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,1:2:14-1:7:19",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,1:2:14-1:7:19",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,1:9:21-1:18:30",
|
||||
"value": [
|
||||
{
|
||||
"string": "sql_table",
|
||||
"raw_string": "sql_table"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": false,
|
||||
"due_to_lazy_glob": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"range": "TestCompile/fields/quoted.d2,2:2:33-2:7:38",
|
||||
"value": [
|
||||
{
|
||||
"string": "width",
|
||||
"raw_string": "width"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/fields/quoted.d2,2:9:40-2:12:43",
|
||||
"raw": "200",
|
||||
"value": "200"
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/fields/quoted.d2,2:2:33-2:7:38",
|
||||
"value": [
|
||||
{
|
||||
"string": "width",
|
||||
"raw_string": "width"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/fields/quoted.d2,2:2:33-2:7:38",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,2:2:33-2:7:38",
|
||||
"value": [
|
||||
{
|
||||
"string": "width",
|
||||
"raw_string": "width"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,2:2:33-2:12:43",
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,2:2:33-2:7:38",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,2:2:33-2:7:38",
|
||||
"value": [
|
||||
{
|
||||
"string": "width",
|
||||
"raw_string": "width"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"number": {
|
||||
"range": "TestCompile/fields/quoted.d2,2:9:40-2:12:43",
|
||||
"raw": "200",
|
||||
"value": "200"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": false,
|
||||
"due_to_lazy_glob": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"range": "TestCompile/fields/quoted.d2,3:2:46-3:8:52",
|
||||
"value": [
|
||||
{
|
||||
"string": "height",
|
||||
"raw_string": "height"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/fields/quoted.d2,3:10:54-3:13:57",
|
||||
"raw": "200",
|
||||
"value": "200"
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/fields/quoted.d2,3:2:46-3:8:52",
|
||||
"value": [
|
||||
{
|
||||
"string": "height",
|
||||
"raw_string": "height"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/fields/quoted.d2,3:2:46-3:8:52",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,3:2:46-3:8:52",
|
||||
"value": [
|
||||
{
|
||||
"string": "height",
|
||||
"raw_string": "height"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,3:2:46-3:13:57",
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,3:2:46-3:8:52",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,3:2:46-3:8:52",
|
||||
"value": [
|
||||
{
|
||||
"string": "height",
|
||||
"raw_string": "height"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"number": {
|
||||
"range": "TestCompile/fields/quoted.d2,3:10:54-3:13:57",
|
||||
"raw": "200",
|
||||
"value": "200"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": false,
|
||||
"due_to_lazy_glob": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"range": "TestCompile/fields/quoted.d2,4:2:60-4:9:67",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/fields/quoted.d2,4:11:69-4:17:75",
|
||||
"value": [
|
||||
{
|
||||
"string": "string",
|
||||
"raw_string": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/fields/quoted.d2,4:2:60-4:9:67",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/fields/quoted.d2,4:2:60-4:9:67",
|
||||
"path": [
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,4:2:60-4:9:67",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,4:2:60-4:17:75",
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,4:2:60-4:9:67",
|
||||
"path": [
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,4:2:60-4:9:67",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,4:11:69-4:17:75",
|
||||
"value": [
|
||||
{
|
||||
"string": "string",
|
||||
"raw_string": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": false,
|
||||
"due_to_lazy_glob": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"range": "TestCompile/fields/quoted.d2,5:2:78-5:8:84",
|
||||
"value": [
|
||||
{
|
||||
"string": "icon",
|
||||
"raw_string": "icon"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/fields/quoted.d2,5:10:86-5:16:92",
|
||||
"value": [
|
||||
{
|
||||
"string": "string",
|
||||
"raw_string": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/fields/quoted.d2,5:2:78-5:8:84",
|
||||
"value": [
|
||||
{
|
||||
"string": "icon",
|
||||
"raw_string": "icon"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/fields/quoted.d2,5:2:78-5:8:84",
|
||||
"path": [
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,5:2:78-5:8:84",
|
||||
"value": [
|
||||
{
|
||||
"string": "icon",
|
||||
"raw_string": "icon"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,5:2:78-5:16:92",
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,5:2:78-5:8:84",
|
||||
"path": [
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,5:2:78-5:8:84",
|
||||
"value": [
|
||||
{
|
||||
"string": "icon",
|
||||
"raw_string": "icon"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,5:10:86-5:16:92",
|
||||
"value": [
|
||||
{
|
||||
"string": "string",
|
||||
"raw_string": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": false,
|
||||
"due_to_lazy_glob": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"range": "TestCompile/fields/quoted.d2,6:2:95-6:9:102",
|
||||
"value": [
|
||||
{
|
||||
"string": "width",
|
||||
"raw_string": "width"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/fields/quoted.d2,6:11:104-6:14:107",
|
||||
"value": [
|
||||
{
|
||||
"string": "int",
|
||||
"raw_string": "int"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/fields/quoted.d2,6:2:95-6:9:102",
|
||||
"value": [
|
||||
{
|
||||
"string": "width",
|
||||
"raw_string": "width"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/fields/quoted.d2,6:2:95-6:9:102",
|
||||
"path": [
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,6:2:95-6:9:102",
|
||||
"value": [
|
||||
{
|
||||
"string": "width",
|
||||
"raw_string": "width"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,6:2:95-6:14:107",
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,6:2:95-6:9:102",
|
||||
"path": [
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,6:2:95-6:9:102",
|
||||
"value": [
|
||||
{
|
||||
"string": "width",
|
||||
"raw_string": "width"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,6:11:104-6:14:107",
|
||||
"value": [
|
||||
{
|
||||
"string": "int",
|
||||
"raw_string": "int"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": false,
|
||||
"due_to_lazy_glob": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": {
|
||||
"range": "TestCompile/fields/quoted.d2,7:2:110-7:10:118",
|
||||
"value": [
|
||||
{
|
||||
"string": "height",
|
||||
"raw_string": "height"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/fields/quoted.d2,7:12:120-7:15:123",
|
||||
"value": [
|
||||
{
|
||||
"string": "int",
|
||||
"raw_string": "int"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/fields/quoted.d2,7:2:110-7:10:118",
|
||||
"value": [
|
||||
{
|
||||
"string": "height",
|
||||
"raw_string": "height"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/fields/quoted.d2,7:2:110-7:10:118",
|
||||
"path": [
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,7:2:110-7:10:118",
|
||||
"value": [
|
||||
{
|
||||
"string": "height",
|
||||
"raw_string": "height"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,7:2:110-7:15:123",
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,7:2:110-7:10:118",
|
||||
"path": [
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,7:2:110-7:10:118",
|
||||
"value": [
|
||||
{
|
||||
"string": "height",
|
||||
"raw_string": "height"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,7:12:120-7:15:123",
|
||||
"value": [
|
||||
{
|
||||
"string": "int",
|
||||
"raw_string": "int"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": false,
|
||||
"due_to_lazy_glob": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"edges": null
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
"range": "TestCompile/fields/quoted.d2,0:0:0-0:8:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "my_table",
|
||||
"raw_string": "my_table"
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_path": {
|
||||
"range": "TestCompile/fields/quoted.d2,0:0:0-0:8:8",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,0:0:0-0:8:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "my_table",
|
||||
"raw_string": "my_table"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"context": {
|
||||
"edge": null,
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,0:0:0-8:1:125",
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,0:0:0-0:8:8",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,0:0:0-0:8:8",
|
||||
"value": [
|
||||
{
|
||||
"string": "my_table",
|
||||
"raw_string": "my_table"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"map": {
|
||||
"range": "TestCompile/fields/quoted.d2,0:10:10-8:1:125",
|
||||
"nodes": [
|
||||
{
|
||||
"map_key": {
|
||||
"range": "TestCompile/fields/quoted.d2,1:2:14-1:18:30",
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,1:2:14-1:7:19",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,1:2:14-1:7:19",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,1:9:21-1:18:30",
|
||||
"value": [
|
||||
{
|
||||
"string": "sql_table",
|
||||
"raw_string": "sql_table"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"map_key": {
|
||||
"range": "TestCompile/fields/quoted.d2,2:2:33-2:12:43",
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,2:2:33-2:7:38",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,2:2:33-2:7:38",
|
||||
"value": [
|
||||
{
|
||||
"string": "width",
|
||||
"raw_string": "width"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"number": {
|
||||
"range": "TestCompile/fields/quoted.d2,2:9:40-2:12:43",
|
||||
"raw": "200",
|
||||
"value": "200"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"map_key": {
|
||||
"range": "TestCompile/fields/quoted.d2,3:2:46-3:13:57",
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,3:2:46-3:8:52",
|
||||
"path": [
|
||||
{
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,3:2:46-3:8:52",
|
||||
"value": [
|
||||
{
|
||||
"string": "height",
|
||||
"raw_string": "height"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"number": {
|
||||
"range": "TestCompile/fields/quoted.d2,3:10:54-3:13:57",
|
||||
"raw": "200",
|
||||
"value": "200"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"map_key": {
|
||||
"range": "TestCompile/fields/quoted.d2,4:2:60-4:17:75",
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,4:2:60-4:9:67",
|
||||
"path": [
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,4:2:60-4:9:67",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,4:11:69-4:17:75",
|
||||
"value": [
|
||||
{
|
||||
"string": "string",
|
||||
"raw_string": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"map_key": {
|
||||
"range": "TestCompile/fields/quoted.d2,5:2:78-5:16:92",
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,5:2:78-5:8:84",
|
||||
"path": [
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,5:2:78-5:8:84",
|
||||
"value": [
|
||||
{
|
||||
"string": "icon",
|
||||
"raw_string": "icon"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,5:10:86-5:16:92",
|
||||
"value": [
|
||||
{
|
||||
"string": "string",
|
||||
"raw_string": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"map_key": {
|
||||
"range": "TestCompile/fields/quoted.d2,6:2:95-6:14:107",
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,6:2:95-6:9:102",
|
||||
"path": [
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,6:2:95-6:9:102",
|
||||
"value": [
|
||||
{
|
||||
"string": "width",
|
||||
"raw_string": "width"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,6:11:104-6:14:107",
|
||||
"value": [
|
||||
{
|
||||
"string": "int",
|
||||
"raw_string": "int"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"map_key": {
|
||||
"range": "TestCompile/fields/quoted.d2,7:2:110-7:15:123",
|
||||
"key": {
|
||||
"range": "TestCompile/fields/quoted.d2,7:2:110-7:10:118",
|
||||
"path": [
|
||||
{
|
||||
"double_quoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,7:2:110-7:10:118",
|
||||
"value": [
|
||||
{
|
||||
"string": "height",
|
||||
"raw_string": "height"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {},
|
||||
"value": {
|
||||
"unquoted_string": {
|
||||
"range": "TestCompile/fields/quoted.d2,7:12:120-7:15:123",
|
||||
"value": [
|
||||
{
|
||||
"string": "int",
|
||||
"raw_string": "int"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"due_to_glob": false,
|
||||
"due_to_lazy_glob": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"edges": null
|
||||
}
|
||||
10
testdata/d2ir/TestCompile/fields/root.exp.json
generated
vendored
|
|
@ -1,7 +1,15 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "TestCompile/fields/root.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
|
|||
100
testdata/d2ir/TestCompile/filters/array.exp.json
generated
vendored
|
|
@ -1,11 +1,27 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "the-little-cannon",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/array.d2,0:0:0-0:17:17",
|
||||
"value": [
|
||||
{
|
||||
"string": "the-little-cannon",
|
||||
"raw_string": "the-little-cannon"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "class",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/array.d2,1:1:22-1:6:27",
|
||||
"value": [
|
||||
{
|
||||
"string": "class",
|
||||
"raw_string": "class"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"values": [
|
||||
{
|
||||
|
|
@ -245,11 +261,27 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/array.d2,12:1:150-12:6:155",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "multiple",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/array.d2,12:7:156-12:15:164",
|
||||
"value": [
|
||||
{
|
||||
"string": "multiple",
|
||||
"raw_string": "multiple"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/array.d2,12:17:166-12:21:170",
|
||||
|
|
@ -542,11 +574,27 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "dino",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/array.d2,3:0:50-3:4:54",
|
||||
"value": [
|
||||
{
|
||||
"string": "dino",
|
||||
"raw_string": "dino"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "class",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/array.d2,4:1:59-4:6:64",
|
||||
"value": [
|
||||
{
|
||||
"string": "class",
|
||||
"raw_string": "class"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"values": [
|
||||
{
|
||||
|
|
@ -838,11 +886,27 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "catapult",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/array.d2,6:0:89-6:8:97",
|
||||
"value": [
|
||||
{
|
||||
"string": "catapult",
|
||||
"raw_string": "catapult"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "class",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/array.d2,7:1:102-7:6:107",
|
||||
"value": [
|
||||
{
|
||||
"string": "class",
|
||||
"raw_string": "class"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"values": [
|
||||
{
|
||||
|
|
@ -1082,11 +1146,27 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/array.d2,12:1:150-12:6:155",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "multiple",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/array.d2,12:7:156-12:15:164",
|
||||
"value": [
|
||||
{
|
||||
"string": "multiple",
|
||||
"raw_string": "multiple"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/array.d2,12:17:166-12:21:170",
|
||||
|
|
|
|||
50
testdata/d2ir/TestCompile/filters/base.exp.json
generated
vendored
|
|
@ -1,11 +1,27 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "jacob",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/base.d2,0:0:0-0:5:5",
|
||||
"value": [
|
||||
{
|
||||
"string": "jacob",
|
||||
"raw_string": "jacob"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "shape",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/base.d2,1:1:10-1:6:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/base.d2,1:8:17-1:14:23",
|
||||
|
|
@ -246,11 +262,27 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "jeremy",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/base.d2,3:0:26-3:6:32",
|
||||
"value": [
|
||||
{
|
||||
"string": "jeremy",
|
||||
"raw_string": "jeremy"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "shape",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/base.d2,4:1:37-4:6:42",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/base.d2,4:8:44-4:17:53",
|
||||
|
|
@ -457,7 +489,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "label",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/base.d2,8:1:81-8:6:86",
|
||||
"value": [
|
||||
{
|
||||
"string": "label",
|
||||
"raw_string": "label"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/base.d2,8:8:88-8:23:103",
|
||||
|
|
|
|||
110
testdata/d2ir/TestCompile/filters/edge.exp.json
generated
vendored
|
|
@ -1,7 +1,15 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/edge.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -828,7 +836,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/edge.d2,0:5:5-0:6:6",
|
||||
"value": [
|
||||
{
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -1155,11 +1171,27 @@
|
|||
{
|
||||
"edge_id": {
|
||||
"src_path": [
|
||||
"x"
|
||||
{
|
||||
"range": "TestCompile/filters/edge.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"src_arrow": false,
|
||||
"dst_path": [
|
||||
"y"
|
||||
{
|
||||
"range": "TestCompile/filters/edge.d2,0:5:5-0:6:6",
|
||||
"value": [
|
||||
{
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"dst_arrow": true,
|
||||
"index": 0,
|
||||
|
|
@ -1168,11 +1200,27 @@
|
|||
"map": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "source-arrowhead",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/edge.d2,1:1:11-1:17:27",
|
||||
"value": [
|
||||
{
|
||||
"string": "source-arrowhead",
|
||||
"raw_string": "source-arrowhead"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "shape",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/edge.d2,1:18:28-1:23:33",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/edge.d2,1:25:35-1:32:42",
|
||||
|
|
@ -1536,11 +1584,27 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "target-arrowhead",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/edge.d2,2:1:44-2:17:60",
|
||||
"value": [
|
||||
{
|
||||
"string": "target-arrowhead",
|
||||
"raw_string": "target-arrowhead"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "shape",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/edge.d2,2:18:61-2:23:66",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/edge.d2,2:25:68-2:32:75",
|
||||
|
|
@ -1904,7 +1968,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "label",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/edge.d2,9:1:170-9:6:175",
|
||||
"value": [
|
||||
{
|
||||
"string": "label",
|
||||
"raw_string": "label"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/edge.d2,9:8:177-9:32:201",
|
||||
|
|
@ -2399,11 +2471,27 @@
|
|||
{
|
||||
"edge_id": {
|
||||
"src_path": [
|
||||
"x"
|
||||
{
|
||||
"range": "TestCompile/filters/edge.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"src_arrow": false,
|
||||
"dst_path": [
|
||||
"y"
|
||||
{
|
||||
"range": "TestCompile/filters/edge.d2,0:5:5-0:6:6",
|
||||
"value": [
|
||||
{
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"dst_arrow": true,
|
||||
"index": 1,
|
||||
|
|
|
|||
190
testdata/d2ir/TestCompile/filters/label-filter/1.exp.json
generated
vendored
|
|
@ -1,15 +1,39 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,1:0:1-1:1:2",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,6:2:27-6:7:32",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "opacity",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,6:8:33-6:15:40",
|
||||
"value": [
|
||||
{
|
||||
"string": "opacity",
|
||||
"raw_string": "opacity"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,9:17:80-9:18:81",
|
||||
|
|
@ -684,15 +708,39 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,2:0:3-2:1:4",
|
||||
"value": [
|
||||
{
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,6:2:27-6:7:32",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "opacity",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,6:8:33-6:15:40",
|
||||
"value": [
|
||||
{
|
||||
"string": "opacity",
|
||||
"raw_string": "opacity"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,6:17:42-6:20:45",
|
||||
|
|
@ -1205,7 +1253,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "p",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,3:0:5-3:1:6",
|
||||
"value": [
|
||||
{
|
||||
"string": "p",
|
||||
"raw_string": "p"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,3:3:8-3:4:9",
|
||||
|
|
@ -1220,11 +1276,27 @@
|
|||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,6:2:27-6:7:32",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "opacity",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,6:8:33-6:15:40",
|
||||
"value": [
|
||||
{
|
||||
"string": "opacity",
|
||||
"raw_string": "opacity"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,13:17:118-13:20:121",
|
||||
|
|
@ -1909,15 +1981,39 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "a",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,4:0:10-4:1:11",
|
||||
"value": [
|
||||
{
|
||||
"string": "a",
|
||||
"raw_string": "a"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,6:2:27-6:7:32",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "opacity",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,6:8:33-6:15:40",
|
||||
"value": [
|
||||
{
|
||||
"string": "opacity",
|
||||
"raw_string": "opacity"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,6:17:42-6:20:45",
|
||||
|
|
@ -2499,15 +2595,39 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "z",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,4:5:15-4:6:16",
|
||||
"value": [
|
||||
{
|
||||
"string": "z",
|
||||
"raw_string": "z"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,6:2:27-6:7:32",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "opacity",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,6:8:33-6:15:40",
|
||||
"value": [
|
||||
{
|
||||
"string": "opacity",
|
||||
"raw_string": "opacity"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,6:17:42-6:20:45",
|
||||
|
|
@ -3093,11 +3213,27 @@
|
|||
{
|
||||
"edge_id": {
|
||||
"src_path": [
|
||||
"a"
|
||||
{
|
||||
"range": "TestCompile/filters/label-filter/1.d2,4:0:10-4:1:11",
|
||||
"value": [
|
||||
{
|
||||
"string": "a",
|
||||
"raw_string": "a"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"src_arrow": false,
|
||||
"dst_path": [
|
||||
"z"
|
||||
{
|
||||
"range": "TestCompile/filters/label-filter/1.d2,4:5:15-4:6:16",
|
||||
"value": [
|
||||
{
|
||||
"string": "z",
|
||||
"raw_string": "z"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"dst_arrow": true,
|
||||
"index": 0,
|
||||
|
|
@ -3117,11 +3253,27 @@
|
|||
"map": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "target-arrowhead",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,17:1:155-17:17:171",
|
||||
"value": [
|
||||
{
|
||||
"string": "target-arrowhead",
|
||||
"raw_string": "target-arrowhead"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "shape",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,17:18:172-17:23:177",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/label-filter/1.d2,17:25:179-17:32:186",
|
||||
|
|
|
|||
100
testdata/d2ir/TestCompile/filters/label-filter/2.exp.json
generated
vendored
|
|
@ -1,7 +1,15 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/2.d2,8:0:83-8:1:84",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -240,7 +248,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/2.d2,8:5:88-8:6:89",
|
||||
"value": [
|
||||
{
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -483,11 +499,27 @@
|
|||
{
|
||||
"edge_id": {
|
||||
"src_path": [
|
||||
"x"
|
||||
{
|
||||
"range": "TestCompile/filters/label-filter/2.d2,8:0:83-8:1:84",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"src_arrow": false,
|
||||
"dst_path": [
|
||||
"y"
|
||||
{
|
||||
"range": "TestCompile/filters/label-filter/2.d2,8:5:88-8:6:89",
|
||||
"value": [
|
||||
{
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"dst_arrow": true,
|
||||
"index": 0,
|
||||
|
|
@ -507,11 +539,27 @@
|
|||
"map": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/2.d2,1:12:13-1:17:18",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "opacity",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/2.d2,1:18:19-1:25:26",
|
||||
"value": [
|
||||
{
|
||||
"string": "opacity",
|
||||
"raw_string": "opacity"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/label-filter/2.d2,5:17:78-5:18:79",
|
||||
|
|
@ -1831,11 +1879,27 @@
|
|||
{
|
||||
"edge_id": {
|
||||
"src_path": [
|
||||
"x"
|
||||
{
|
||||
"range": "TestCompile/filters/label-filter/2.d2,8:0:83-8:1:84",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"src_arrow": false,
|
||||
"dst_path": [
|
||||
"y"
|
||||
{
|
||||
"range": "TestCompile/filters/label-filter/2.d2,8:5:88-8:6:89",
|
||||
"value": [
|
||||
{
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"dst_arrow": true,
|
||||
"index": 1,
|
||||
|
|
@ -1844,11 +1908,27 @@
|
|||
"map": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/2.d2,1:12:13-1:17:18",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "opacity",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/2.d2,1:18:19-1:25:26",
|
||||
"value": [
|
||||
{
|
||||
"string": "opacity",
|
||||
"raw_string": "opacity"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/label-filter/2.d2,1:27:28-1:30:31",
|
||||
|
|
|
|||
60
testdata/d2ir/TestCompile/filters/label-filter/3.exp.json
generated
vendored
|
|
@ -1,7 +1,15 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:1:54",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -128,7 +136,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/3.d2,6:5:58-6:6:59",
|
||||
"value": [
|
||||
{
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
@ -259,11 +275,27 @@
|
|||
{
|
||||
"edge_id": {
|
||||
"src_path": [
|
||||
"x"
|
||||
{
|
||||
"range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:1:54",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"src_arrow": false,
|
||||
"dst_path": [
|
||||
"y"
|
||||
{
|
||||
"range": "TestCompile/filters/label-filter/3.d2,6:5:58-6:6:59",
|
||||
"value": [
|
||||
{
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"dst_arrow": true,
|
||||
"index": 0,
|
||||
|
|
@ -283,11 +315,27 @@
|
|||
"map": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/3.d2,3:2:31-3:7:36",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "opacity",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/label-filter/3.d2,3:8:37-3:15:44",
|
||||
"value": [
|
||||
{
|
||||
"string": "opacity",
|
||||
"raw_string": "opacity"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/label-filter/3.d2,3:17:46-3:20:49",
|
||||
|
|
|
|||
70
testdata/d2ir/TestCompile/filters/lazy-filter.exp.json
generated
vendored
|
|
@ -1,15 +1,39 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "a",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/lazy-filter.d2,6:0:42-6:1:43",
|
||||
"value": [
|
||||
{
|
||||
"string": "a",
|
||||
"raw_string": "a"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:7:25",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/lazy-filter.d2,3:8:26-3:12:30",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/lazy-filter.d2,3:14:32-3:20:38",
|
||||
|
|
@ -260,11 +284,27 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "b",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/lazy-filter.d2,7:0:44-7:1:45",
|
||||
"value": [
|
||||
{
|
||||
"string": "b",
|
||||
"raw_string": "b"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "label",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/lazy-filter.d2,8:2:48-8:7:53",
|
||||
"value": [
|
||||
{
|
||||
"string": "label",
|
||||
"raw_string": "label"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/lazy-filter.d2,8:9:55-8:10:56",
|
||||
|
|
@ -557,11 +597,27 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/lazy-filter.d2,3:2:20-3:7:25",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/lazy-filter.d2,3:8:26-3:12:30",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/lazy-filter.d2,3:14:32-3:20:38",
|
||||
|
|
|
|||
50
testdata/d2ir/TestCompile/filters/not-basic.exp.json
generated
vendored
|
|
@ -1,11 +1,27 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "jacob",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/not-basic.d2,0:0:0-0:5:5",
|
||||
"value": [
|
||||
{
|
||||
"string": "jacob",
|
||||
"raw_string": "jacob"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "shape",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/not-basic.d2,1:1:10-1:6:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/not-basic.d2,1:8:17-1:14:23",
|
||||
|
|
@ -212,7 +228,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "label",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/not-basic.d2,8:1:82-8:6:87",
|
||||
"value": [
|
||||
{
|
||||
"string": "label",
|
||||
"raw_string": "label"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/not-basic.d2,8:8:89-8:27:108",
|
||||
|
|
@ -389,11 +413,27 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "jeremy",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/not-basic.d2,3:0:26-3:6:32",
|
||||
"value": [
|
||||
{
|
||||
"string": "jeremy",
|
||||
"raw_string": "jeremy"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "shape",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/not-basic.d2,4:1:37-4:6:42",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/not-basic.d2,4:8:44-4:17:53",
|
||||
|
|
|
|||
50
testdata/d2ir/TestCompile/filters/order.exp.json
generated
vendored
|
|
@ -1,11 +1,27 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "jacob",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/order.d2,0:0:0-0:5:5",
|
||||
"value": [
|
||||
{
|
||||
"string": "jacob",
|
||||
"raw_string": "jacob"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "shape",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/order.d2,1:1:10-1:6:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/order.d2,1:8:17-1:14:23",
|
||||
|
|
@ -246,11 +262,27 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "jeremy",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/order.d2,3:0:26-3:6:32",
|
||||
"value": [
|
||||
{
|
||||
"string": "jeremy",
|
||||
"raw_string": "jeremy"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "shape",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/order.d2,4:1:37-4:6:42",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/order.d2,4:8:44-4:17:53",
|
||||
|
|
@ -457,7 +489,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "label",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/order.d2,7:1:62-7:6:67",
|
||||
"value": [
|
||||
{
|
||||
"string": "label",
|
||||
"raw_string": "label"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/order.d2,7:8:69-7:23:84",
|
||||
|
|
|
|||
150
testdata/d2ir/TestCompile/filters/primary-filter.exp.json
generated
vendored
|
|
@ -1,11 +1,27 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "parent",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/primary-filter.d2,1:0:1-1:6:7",
|
||||
"value": [
|
||||
{
|
||||
"string": "parent",
|
||||
"raw_string": "parent"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "a",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/primary-filter.d2,2:2:13-2:3:14",
|
||||
"value": [
|
||||
{
|
||||
"string": "a",
|
||||
"raw_string": "a"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": null,
|
||||
"edges": null
|
||||
|
|
@ -350,7 +366,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "b1",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/primary-filter.d2,2:7:18-2:9:20",
|
||||
"value": [
|
||||
{
|
||||
"string": "b1",
|
||||
"raw_string": "b1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": null,
|
||||
"edges": null
|
||||
|
|
@ -695,7 +719,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "b3",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/primary-filter.d2,4:7:38-4:9:40",
|
||||
"value": [
|
||||
{
|
||||
"string": "b3",
|
||||
"raw_string": "b3"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": null,
|
||||
"edges": null
|
||||
|
|
@ -816,7 +848,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "c1",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/primary-filter.d2,6:8:50-6:10:52",
|
||||
"value": [
|
||||
{
|
||||
"string": "c1",
|
||||
"raw_string": "c1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [],
|
||||
"edges": null
|
||||
|
|
@ -1044,11 +1084,27 @@
|
|||
{
|
||||
"edge_id": {
|
||||
"src_path": [
|
||||
"a"
|
||||
{
|
||||
"range": "TestCompile/filters/primary-filter.d2,2:2:13-2:3:14",
|
||||
"value": [
|
||||
{
|
||||
"string": "a",
|
||||
"raw_string": "a"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"src_arrow": false,
|
||||
"dst_path": [
|
||||
"b1"
|
||||
{
|
||||
"range": "TestCompile/filters/primary-filter.d2,2:7:18-2:9:20",
|
||||
"value": [
|
||||
{
|
||||
"string": "b1",
|
||||
"raw_string": "b1"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"dst_arrow": true,
|
||||
"index": 0,
|
||||
|
|
@ -1147,11 +1203,27 @@
|
|||
{
|
||||
"edge_id": {
|
||||
"src_path": [
|
||||
"a"
|
||||
{
|
||||
"range": "TestCompile/filters/primary-filter.d2,2:2:13-2:3:14",
|
||||
"value": [
|
||||
{
|
||||
"string": "a",
|
||||
"raw_string": "a"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"src_arrow": false,
|
||||
"dst_path": [
|
||||
"b3"
|
||||
{
|
||||
"range": "TestCompile/filters/primary-filter.d2,4:7:38-4:9:40",
|
||||
"value": [
|
||||
{
|
||||
"string": "b3",
|
||||
"raw_string": "b3"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"dst_arrow": true,
|
||||
"index": 0,
|
||||
|
|
@ -1250,11 +1322,27 @@
|
|||
{
|
||||
"edge_id": {
|
||||
"src_path": [
|
||||
"b1"
|
||||
{
|
||||
"range": "TestCompile/filters/primary-filter.d2,2:7:18-2:9:20",
|
||||
"value": [
|
||||
{
|
||||
"string": "b1",
|
||||
"raw_string": "b1"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"src_arrow": false,
|
||||
"dst_path": [
|
||||
"c1"
|
||||
{
|
||||
"range": "TestCompile/filters/primary-filter.d2,6:8:50-6:10:52",
|
||||
"value": [
|
||||
{
|
||||
"string": "c1",
|
||||
"raw_string": "c1"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"dst_arrow": true,
|
||||
"index": 0,
|
||||
|
|
@ -1879,19 +1967,51 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "classes",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/primary-filter.d2,20:0:185-20:7:192",
|
||||
"value": [
|
||||
{
|
||||
"string": "classes",
|
||||
"raw_string": "classes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "hidden",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/primary-filter.d2,21:2:198-21:8:204",
|
||||
"value": [
|
||||
{
|
||||
"string": "hidden",
|
||||
"raw_string": "hidden"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "style",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/primary-filter.d2,22:4:212-22:9:217",
|
||||
"value": [
|
||||
{
|
||||
"string": "style",
|
||||
"raw_string": "style"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "fill",
|
||||
"name": {
|
||||
"range": "TestCompile/filters/primary-filter.d2,23:6:227-23:10:231",
|
||||
"value": [
|
||||
{
|
||||
"string": "fill",
|
||||
"raw_string": "fill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "TestCompile/filters/primary-filter.d2,23:12:233-23:15:236",
|
||||
|
|
|
|||
130
testdata/d2ir/TestCompile/imports/boards-deep.exp.json
generated
vendored
|
|
@ -1,11 +1,27 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "a",
|
||||
"name": {
|
||||
"range": "index.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "a",
|
||||
"raw_string": "a"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "link",
|
||||
"name": {
|
||||
"range": "index.d2,0:2:2-0:6:6",
|
||||
"value": [
|
||||
{
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
|
|
@ -196,19 +212,51 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "layers",
|
||||
"name": {
|
||||
"range": "index.d2,0:18:18-0:24:24",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "b",
|
||||
"name": {
|
||||
"range": "index.d2,0:28:28-0:29:29",
|
||||
"value": [
|
||||
{
|
||||
"string": "b",
|
||||
"raw_string": "b"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "b",
|
||||
"name": {
|
||||
"range": "b.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "b",
|
||||
"raw_string": "b"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "link",
|
||||
"name": {
|
||||
"range": "b.d2,0:2:2-0:6:6",
|
||||
"value": [
|
||||
{
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
|
|
@ -399,19 +447,51 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "layers",
|
||||
"name": {
|
||||
"range": "b.d2,0:18:18-0:24:24",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "c",
|
||||
"name": {
|
||||
"range": "b.d2,0:28:28-0:29:29",
|
||||
"value": [
|
||||
{
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "c",
|
||||
"name": {
|
||||
"range": "c.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "c",
|
||||
"raw_string": "c"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "link",
|
||||
"name": {
|
||||
"range": "c.d2,0:2:2-0:6:6",
|
||||
"value": [
|
||||
{
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
|
|
@ -602,15 +682,39 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "layers",
|
||||
"name": {
|
||||
"range": "c.d2,0:18:18-0:24:24",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "d",
|
||||
"name": {
|
||||
"range": "c.d2,0:28:28-0:29:29",
|
||||
"value": [
|
||||
{
|
||||
"string": "d",
|
||||
"raw_string": "d"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "d",
|
||||
"name": {
|
||||
"range": "d.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "d",
|
||||
"raw_string": "d"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
|
|||
90
testdata/d2ir/TestCompile/imports/boards.exp.json
generated
vendored
|
|
@ -1,11 +1,27 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "index.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "link",
|
||||
"name": {
|
||||
"range": "index.d2,0:2:2-0:6:6",
|
||||
"value": [
|
||||
{
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
|
|
@ -196,19 +212,51 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "layers",
|
||||
"name": {
|
||||
"range": "index.d2,0:18:18-0:24:24",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "index.d2,0:28:28-0:29:29",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "y",
|
||||
"name": {
|
||||
"range": "x.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "link",
|
||||
"name": {
|
||||
"range": "x.d2,0:2:2-0:6:6",
|
||||
"value": [
|
||||
{
|
||||
"string": "link",
|
||||
"raw_string": "link"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": ",0:0:0-0:0:0",
|
||||
|
|
@ -399,15 +447,39 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "layers",
|
||||
"name": {
|
||||
"range": "x.d2,0:18:18-0:24:24",
|
||||
"value": [
|
||||
{
|
||||
"string": "layers",
|
||||
"raw_string": "layers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "y",
|
||||
"name": {
|
||||
"range": "x.d2,0:28:28-0:29:29",
|
||||
"value": [
|
||||
{
|
||||
"string": "y",
|
||||
"raw_string": "y"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "meow",
|
||||
"name": {
|
||||
"range": "y.d2,0:0:0-0:4:4",
|
||||
"value": [
|
||||
{
|
||||
"string": "meow",
|
||||
"raw_string": "meow"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
|
|||
20
testdata/d2ir/TestCompile/imports/merge-arrays.exp.json
generated
vendored
|
|
@ -1,11 +1,27 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "index.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "class",
|
||||
"name": {
|
||||
"range": "index.d2,0:2:2-0:7:7",
|
||||
"value": [
|
||||
{
|
||||
"string": "class",
|
||||
"raw_string": "class"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"values": [
|
||||
{
|
||||
|
|
|
|||
30
testdata/d2ir/TestCompile/imports/nested-scope.exp.json
generated
vendored
|
|
@ -1,15 +1,39 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "elem",
|
||||
"name": {
|
||||
"range": "second.d2,0:0:0-0:4:4",
|
||||
"value": [
|
||||
{
|
||||
"string": "elem",
|
||||
"raw_string": "elem"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "third",
|
||||
"name": {
|
||||
"range": "third.d2,0:0:0-0:5:5",
|
||||
"value": [
|
||||
{
|
||||
"string": "third",
|
||||
"raw_string": "third"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "elem",
|
||||
"name": {
|
||||
"range": "third.d2,1:2:11-1:6:15",
|
||||
"value": [
|
||||
{
|
||||
"string": "elem",
|
||||
"raw_string": "elem"
|
||||
}
|
||||
]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"string": {
|
||||
|
|
|
|||
10
testdata/d2ir/TestCompile/imports/nested/array.exp.json
generated
vendored
|
|
@ -1,7 +1,15 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "index.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"values": [
|
||||
{
|
||||
|
|
|
|||
30
testdata/d2ir/TestCompile/imports/nested/map.exp.json
generated
vendored
|
|
@ -1,11 +1,27 @@
|
|||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "x",
|
||||
"name": {
|
||||
"range": "index.d2,0:0:0-0:1:1",
|
||||
"value": [
|
||||
{
|
||||
"string": "x",
|
||||
"raw_string": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "shape",
|
||||
"name": {
|
||||
"range": "x.d2,1:1:6-1:6:11",
|
||||
"value": [
|
||||
{
|
||||
"string": "shape",
|
||||
"raw_string": "shape"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "x.d2,1:8:13-1:14:19",
|
||||
|
|
@ -84,7 +100,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "label",
|
||||
"name": {
|
||||
"range": "x.d2,2:1:21-2:6:26",
|
||||
"value": [
|
||||
{
|
||||
"string": "label",
|
||||
"raw_string": "label"
|
||||
}
|
||||
]
|
||||
},
|
||||
"primary": {
|
||||
"value": {
|
||||
"range": "x.d2,2:8:28-2:12:32",
|
||||
|
|
|
|||