implement validation

This commit is contained in:
Alexander Wang 2023-02-05 10:36:38 -08:00
parent 0da4e150cd
commit 102560a8ad
No known key found for this signature in database
GPG key ID: D89FA31966BDBECE
83 changed files with 1642 additions and 12 deletions

View file

@ -71,6 +71,9 @@ func (c *compiler) compileBoard(g *d2graph.Graph, ir *d2ir.Map) *d2graph.Graph {
c.compileBoardsField(g, ir, "layers")
c.compileBoardsField(g, ir, "scenarios")
c.compileBoardsField(g, ir, "steps")
c.validateBoardLink(g, ir)
return g
}
@ -275,7 +278,9 @@ func (c *compiler) compileReserved(attrs *d2graph.Attributes, f *d2ir.Field) {
attrs.Height.Value = scalar.ScalarString()
attrs.Height.MapKey = f.LastPrimaryKey()
case "link":
attrs.Link = scalar.ScalarString()
attrs.Link.Value = scalar.ScalarString()
attrs.Link.MapKey = f.LastPrimaryKey()
attrs.Link.MapKey.Range = scalar.GetRange()
case "direction":
dirs := []string{"up", "down", "right", "left"}
if !go2.Contains(dirs, scalar.ScalarString()) {
@ -646,6 +651,39 @@ func (c *compiler) validateNear(g *d2graph.Graph) {
}
}
func (c *compiler) validateBoardLink(g *d2graph.Graph, ir *d2ir.Map) {
for _, obj := range g.Objects {
if obj.Attributes.Link.Value == "" {
continue
}
linkKey, err := d2parser.ParseKey(obj.Attributes.Link.Value)
// Links can be urls
if err != nil {
continue
}
// If the keyword is not another board, don't validate
// Might just be linking to a local folder
switch linkKey.Path[0].Unbox().ScalarString() {
case "layers", "scenarios", "steps":
default:
continue
}
b := ir.GetField(linkKey.IDA()...)
if b == nil {
c.errorf(obj.Attributes.Link.MapKey, "link key %#v to board not found", obj.Attributes.Link.Value)
continue
}
kind := d2ir.NodeBoardKind(b)
if kind == "" {
c.errorf(obj.Attributes.Link.MapKey, "internal link key %#v is not a top-level board", obj.Attributes.Link.Value)
continue
}
}
}
func init() {
FullToShortLanguageAliases = make(map[string]string, len(ShortToFullLanguageAliases))
for k, v := range ShortToFullLanguageAliases {

View file

@ -1351,8 +1351,8 @@ x -> y: {
if len(g.Objects) != 1 {
t.Fatal(g.Objects)
}
if g.Objects[0].Attributes.Link != "https://google.com" {
t.Fatal(g.Objects[0].Attributes.Link)
if g.Objects[0].Attributes.Link.Value != "https://google.com" {
t.Fatal(g.Objects[0].Attributes.Link.Value)
}
},
},
@ -1367,8 +1367,8 @@ x -> y: {
if len(g.Objects) != 1 {
t.Fatal(g.Objects)
}
if g.Objects[0].Attributes.Link != "Overview.Untitled board 7.zzzzz" {
t.Fatal(g.Objects[0].Attributes.Link)
if g.Objects[0].Attributes.Link.Value != "Overview.Untitled board 7.zzzzz" {
t.Fatal(g.Objects[0].Attributes.Link.Value)
}
},
},
@ -1899,6 +1899,41 @@ Chinchillas_Collectibles.chinchilla -> Chinchillas.id`,
tassert.Equal(t, 2, *g.Edges[0].SrcTableColumnIndex)
},
},
{
name: "link-board-ok",
text: `x.link: layers.x
layers: {
x
}`,
},
{
name: "link-board-not-found",
text: `x.link: layers.x
`,
expErr: `d2/testdata/d2compiler/TestCompile/link-board-not-found.d2:1:9: link key "layers.x" to board not found`,
},
{
name: "link-board-not-board",
text: `zzz
x.link: layers.x.y
layers: {
x: {
y
}
}`,
expErr: `d2/testdata/d2compiler/TestCompile/link-board-not-board.d2:2:9: internal link key "layers.x.y" is not a top-level board`,
},
{
name: "link-board-nested",
text: `x.link: layers.x.layers.x
layers: {
x: {
layers: {
x
}
}
}`,
},
}
for _, tc := range testCases {

View file

@ -150,7 +150,7 @@ func toShape(obj *d2graph.Object, theme *d2themes.Theme) d2target.Shape {
}
shape.Tooltip = obj.Attributes.Tooltip
shape.Link = obj.Attributes.Link
shape.Link = obj.Attributes.Link.Value
shape.Icon = obj.Attributes.Icon
if obj.IconPosition != nil {
shape.IconPosition = *obj.IconPosition

View file

@ -96,7 +96,7 @@ type Attributes struct {
Style Style `json:"style"`
Icon *url.URL `json:"icon,omitempty"`
Tooltip string `json:"tooltip,omitempty"`
Link string `json:"link,omitempty"`
Link Scalar `json:"link"`
// Only applicable for images right now
Width *Scalar `json:"width,omitempty"`
@ -1263,7 +1263,7 @@ func (g *Graph) SetDimensions(mtexts []*d2target.MText, ruler *textmeasure.Ruler
switch shapeType {
case shape.TABLE_TYPE, shape.CLASS_TYPE, shape.CODE_TYPE, shape.IMAGE_TYPE:
default:
if obj.Attributes.Link != "" {
if obj.Attributes.Link.Value != "" {
paddingX += 32
}
if obj.Attributes.Tooltip != "" {

View file

@ -85,6 +85,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -146,6 +149,9 @@
"Fragment": "",
"RawFragment": ""
},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -80,6 +80,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -129,6 +132,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "sequence_diagram"

View file

@ -80,6 +80,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -129,6 +132,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "circle"

View file

@ -87,6 +87,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -140,6 +143,9 @@
"value": "0.4"
}
},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -179,6 +179,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -249,6 +252,9 @@
"value": "shape"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "class"

View file

@ -153,6 +153,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -216,6 +219,9 @@
"value": "0.4"
}
},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "class"

View file

@ -113,6 +113,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -162,6 +165,9 @@
"value": "bar"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -41,6 +41,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -90,6 +93,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -115,6 +115,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -168,6 +171,9 @@
"value": "true"
}
},
"link": {
"value": ""
},
"width": {
"value": "200"
},

View file

@ -143,6 +143,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -192,6 +195,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"width": {
"value": "200"
},

View file

@ -64,6 +64,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -99,6 +102,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -148,6 +154,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -195,6 +204,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -243,6 +243,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -272,6 +275,9 @@
"value": "Reisner's Rule of Conceptual Inertia"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "diamond"
@ -293,6 +299,9 @@
"value": "true"
}
},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -314,6 +323,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -363,6 +375,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -410,6 +425,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -111,6 +111,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -146,6 +149,9 @@
"value": "The kids will love our inflatable slides"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -180,6 +186,9 @@
"value": "The kids will love our inflatable slides"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -229,6 +238,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -296,6 +308,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -343,6 +358,9 @@
"value": "z"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -140,6 +140,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -175,6 +178,9 @@
"value": "Space: the final frontier. These are the voyages of the starship Enterprise."
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -209,6 +215,9 @@
"value": "Space: the final frontier. These are the voyages of the starship Enterprise."
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -258,6 +267,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -325,6 +337,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -372,6 +387,9 @@
"value": "z"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -342,6 +342,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -379,6 +382,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -519,6 +525,9 @@
"value": "src"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "sql_table"
@ -657,6 +666,9 @@
"value": "dst"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "sql_table"

View file

@ -109,6 +109,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -148,6 +151,9 @@
"value": "true"
}
},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -197,6 +203,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -244,6 +253,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -152,6 +152,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -181,6 +184,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "diamond"
@ -206,6 +212,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -275,6 +284,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -342,6 +354,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -120,6 +120,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -149,6 +152,9 @@
"value": "yo"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -171,6 +177,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -220,6 +229,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -267,6 +279,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -155,6 +155,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -190,6 +193,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -271,6 +277,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "sql_table"
@ -318,6 +327,9 @@
"value": "p"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -365,6 +377,9 @@
"value": "q"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -135,6 +135,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -173,6 +176,9 @@
"value": "two"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -242,6 +248,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -309,6 +318,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -154,6 +154,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -192,6 +195,9 @@
"value": "Space: the final frontier. These are the voyages of the starship Enterprise."
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -261,6 +267,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -328,6 +337,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -164,6 +164,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -202,6 +205,9 @@
"value": "two"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -251,6 +257,9 @@
"value": "b"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -318,6 +327,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -385,6 +397,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -180,6 +180,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -218,6 +221,9 @@
"value": "two"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -287,6 +293,9 @@
"value": "b"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -354,6 +363,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -421,6 +433,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -193,6 +193,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -235,6 +238,9 @@
"value": "0.4"
}
},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -304,6 +310,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -371,6 +380,9 @@
"value": "a"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -438,6 +450,9 @@
"value": "b"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -199,6 +199,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -241,6 +244,9 @@
"value": "0.4"
}
},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -290,6 +296,9 @@
"value": "a"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -337,6 +346,9 @@
"value": "b"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -384,6 +396,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -212,6 +212,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -254,6 +257,9 @@
"value": "0.4"
}
},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -303,6 +309,9 @@
"value": "a"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -350,6 +359,9 @@
"value": "b"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -397,6 +409,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -230,6 +230,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -272,6 +275,9 @@
"value": "0.4"
}
},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -321,6 +327,9 @@
"value": "a"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -368,6 +377,9 @@
"value": "b"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -415,6 +427,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -120,6 +120,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -159,6 +162,9 @@
"value": "0.5"
}
},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -208,6 +214,9 @@
"value": "hey y9"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -255,6 +264,9 @@
"value": "qwer"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -103,6 +103,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -138,6 +141,9 @@
"value": "Space: the final frontier. These are the voyages of the starship Enterprise."
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -187,6 +193,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -234,6 +243,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -132,6 +132,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -161,6 +164,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "diamond"
@ -183,6 +189,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -232,6 +241,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -279,6 +291,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -148,6 +148,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -190,6 +193,9 @@
"value": "0.4"
}
},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -259,6 +265,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -326,6 +335,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -166,6 +166,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -208,6 +211,9 @@
"value": "0.4"
}
},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -277,6 +283,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -344,6 +353,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -128,6 +128,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -167,6 +170,9 @@
"value": "0.4"
}
},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -216,6 +222,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -263,6 +272,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -110,6 +110,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -149,6 +152,9 @@
"value": "0.4"
}
},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -198,6 +204,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -245,6 +254,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -220,6 +220,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -249,6 +252,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "diamond"
@ -266,6 +272,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "diamond"
@ -290,6 +299,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -359,6 +371,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -426,6 +441,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -114,6 +114,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -143,6 +146,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "triangle"
@ -165,6 +171,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -214,6 +223,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -261,6 +273,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -170,6 +170,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -199,6 +202,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "diamond"
@ -224,6 +230,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -293,6 +302,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -360,6 +372,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -41,6 +41,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -90,6 +93,9 @@
"value": "b\nb"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -162,6 +162,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -227,6 +230,9 @@
"Fragment": "",
"RawFragment": ""
},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "image"

View file

@ -0,0 +1,451 @@
{
"graph": {
"name": "",
"ast": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,0:0:0-7:1:75",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,0:8:8-0:25:25",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,0:0:0-0:6:6",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,0:0:0-0:1:1",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,0:2:2-0:6:6",
"value": [
{
"string": "link",
"raw_string": "link"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,0:8:8-0:25:25",
"value": [
{
"string": "layers.x.layers.x",
"raw_string": "layers.x.layers.x"
}
]
}
}
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,1:0:26-7:1:75",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,1:0:26-1:6:32",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,1:0:26-1:6:32",
"value": [
{
"string": "layers",
"raw_string": "layers"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,1:8:34-7:0:74",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,2:1:37-6:3:73",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,2:1:37-2:2:38",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,2:1:37-2:2:38",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,2:4:40-6:2:72",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,3:4:46-5:5:69",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,3:4:46-3:10:52",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,3:4:46-3:10:52",
"value": [
{
"string": "layers",
"raw_string": "layers"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,3:12:54-5:4:68",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,4:6:62-4:7:63",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,4:6:62-4:7:63",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,4:6:62-4:7:63",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
}
]
},
"primary": {},
"value": {}
}
}
]
}
}
}
}
]
}
}
}
}
]
}
}
}
}
]
},
"root": {
"id": "",
"id_val": "",
"label_dimensions": {
"width": 0,
"height": 0
},
"attributes": {
"label": {
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
},
"direction": {
"value": ""
},
"constraint": {
"value": ""
}
},
"zIndex": 0
},
"edges": null,
"objects": [
{
"id": "x",
"id_val": "x",
"label_dimensions": {
"width": 0,
"height": 0
},
"references": [
{
"key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,0:0:0-0:6:6",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,0:0:0-0:1:1",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,0:2:2-0:6:6",
"value": [
{
"string": "link",
"raw_string": "link"
}
]
}
}
]
},
"key_path_index": 0,
"map_key_edge_index": -1
}
],
"attributes": {
"label": {
"value": "x"
},
"style": {},
"link": {
"value": "layers.x.layers.x"
},
"near_key": null,
"shape": {
"value": "rectangle"
},
"direction": {
"value": ""
},
"constraint": {
"value": ""
}
},
"zIndex": 0
}
],
"layers": [
{
"name": "x",
"ast": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,0:0:0-7:1:75",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,0:8:8-0:25:25",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,0:0:0-0:6:6",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,0:0:0-0:1:1",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,0:2:2-0:6:6",
"value": [
{
"string": "link",
"raw_string": "link"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,0:8:8-0:25:25",
"value": [
{
"string": "layers.x.layers.x",
"raw_string": "layers.x.layers.x"
}
]
}
}
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,1:0:26-7:1:75",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,1:0:26-1:6:32",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,1:0:26-1:6:32",
"value": [
{
"string": "layers",
"raw_string": "layers"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,1:8:34-7:0:74",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,2:1:37-6:3:73",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,2:1:37-2:2:38",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,2:1:37-2:2:38",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,2:4:40-6:2:72",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,3:4:46-5:5:69",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,3:4:46-3:10:52",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,3:4:46-3:10:52",
"value": [
{
"string": "layers",
"raw_string": "layers"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,3:12:54-5:4:68",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,4:6:62-4:7:63",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,4:6:62-4:7:63",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-nested.d2,4:6:62-4:7:63",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
}
]
},
"primary": {},
"value": {}
}
}
]
}
}
}
}
]
}
}
}
}
]
}
}
}
}
]
},
"root": {
"id": "",
"id_val": "",
"label_dimensions": {
"width": 0,
"height": 0
},
"attributes": {
"label": {
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
},
"direction": {
"value": ""
},
"constraint": {
"value": ""
}
},
"zIndex": 0
},
"edges": null,
"objects": null
}
]
},
"err": null
}

View file

@ -0,0 +1,12 @@
{
"graph": null,
"err": {
"ioerr": null,
"errs": [
{
"range": "d2/testdata/d2compiler/TestCompile/link-board-not-board.d2,1:8:12-1:18:22",
"errmsg": "d2/testdata/d2compiler/TestCompile/link-board-not-board.d2:2:9: internal link key \"layers.x.y\" is not a top-level board"
}
]
}
}

View file

@ -0,0 +1,12 @@
{
"graph": null,
"err": {
"ioerr": null,
"errs": [
{
"range": "d2/testdata/d2compiler/TestCompile/link-board-not-found.d2,0:8:8-0:16:16",
"errmsg": "d2/testdata/d2compiler/TestCompile/link-board-not-found.d2:1:9: link key \"layers.x\" to board not found"
}
]
}
}

199
testdata/d2compiler/TestCompile/link-board-ok.exp.json generated vendored Normal file
View file

@ -0,0 +1,199 @@
{
"graph": {
"name": "",
"ast": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-ok.d2,0:0:0-3:1:32",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-ok.d2,0:8:8-0:16:16",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-ok.d2,0:0:0-0:6:6",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-ok.d2,0:0:0-0:1:1",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-ok.d2,0:2:2-0:6:6",
"value": [
{
"string": "link",
"raw_string": "link"
}
]
}
}
]
},
"primary": {},
"value": {
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-ok.d2,0:8:8-0:16:16",
"value": [
{
"string": "layers.x",
"raw_string": "layers.x"
}
]
}
}
}
},
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-ok.d2,1:0:17-3:1:32",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-ok.d2,1:0:17-1:6:23",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-ok.d2,1:0:17-1:6:23",
"value": [
{
"string": "layers",
"raw_string": "layers"
}
]
}
}
]
},
"primary": {},
"value": {
"map": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-ok.d2,1:8:25-3:0:31",
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-ok.d2,2:2:29-2:3:30",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-ok.d2,2:2:29-2:3:30",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-ok.d2,2:2:29-2:3:30",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
}
]
},
"primary": {},
"value": {}
}
}
]
}
}
}
}
]
},
"root": {
"id": "",
"id_val": "",
"label_dimensions": {
"width": 0,
"height": 0
},
"attributes": {
"label": {
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
},
"direction": {
"value": ""
},
"constraint": {
"value": ""
}
},
"zIndex": 0
},
"edges": null,
"objects": [
{
"id": "x",
"id_val": "x",
"label_dimensions": {
"width": 0,
"height": 0
},
"references": [
{
"key": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-ok.d2,0:0:0-0:6:6",
"path": [
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-ok.d2,0:0:0-0:1:1",
"value": [
{
"string": "x",
"raw_string": "x"
}
]
}
},
{
"unquoted_string": {
"range": "d2/testdata/d2compiler/TestCompile/link-board-ok.d2,0:2:2-0:6:6",
"value": [
{
"string": "link",
"raw_string": "link"
}
]
}
}
]
},
"key_path_index": 0,
"map_key_edge_index": -1
}
],
"attributes": {
"label": {
"value": "x"
},
"style": {},
"link": {
"value": "layers.x"
},
"near_key": null,
"shape": {
"value": "rectangle"
},
"direction": {
"value": ""
},
"constraint": {
"value": ""
}
},
"zIndex": 0
}
]
},
"err": null
}

View file

@ -62,6 +62,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -122,6 +125,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": {
"range": "d2/testdata/d2compiler/TestCompile/near_constant.d2,0:8:8-0:18:18",
"path": [

View file

@ -175,6 +175,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -224,6 +227,9 @@
"value": "outer"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -331,6 +337,9 @@
"value": "table"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "sql_table"

View file

@ -41,6 +41,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -90,6 +93,9 @@
"value": "null"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -30,7 +30,7 @@
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/path_link.d2,1:2:7-1:39:44",
"range": "d2/testdata/d2compiler/TestCompile/path_link.d2,1:8:13-1:39:44",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/path_link.d2,1:2:7-1:6:11",
"path": [
@ -80,6 +80,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -129,7 +132,9 @@
"value": "x"
},
"style": {},
"link": "Overview.Untitled board 7.zzzzz",
"link": {
"value": "Overview.Untitled board 7.zzzzz"
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -275,6 +275,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -377,6 +380,9 @@
"Fragment": "",
"RawFragment": ""
},
"link": {
"value": ""
},
"near_key": {
"range": "d2/testdata/d2compiler/TestCompile/reserved_icon_near_style.d2,6:8:90-6:9:91",
"path": [
@ -439,6 +445,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -51,6 +51,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""

View file

@ -51,6 +51,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "sequence_diagram"

View file

@ -64,6 +64,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -99,6 +102,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -168,6 +174,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -260,6 +260,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "sequence_diagram"
@ -295,6 +298,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -329,6 +335,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -442,6 +451,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -553,6 +565,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -664,6 +679,9 @@
"value": "q"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -775,6 +793,9 @@
"value": "j"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -886,6 +907,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -997,6 +1021,9 @@
"value": "p"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -1044,6 +1071,9 @@
"value": "ok"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -238,6 +238,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "sequence_diagram"
@ -273,6 +276,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -386,6 +392,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -497,6 +506,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -608,6 +620,9 @@
"value": "q"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -655,6 +670,9 @@
"value": "ok"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -724,6 +742,9 @@
"value": "j"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -793,6 +814,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -862,6 +886,9 @@
"value": "p"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -909,6 +936,9 @@
"value": "meow"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -160,6 +160,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "sequence_diagram"
@ -209,6 +212,9 @@
"value": "a"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -287,6 +293,9 @@
"value": "d"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -334,6 +343,9 @@
"value": "choo"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -392,6 +404,9 @@
"value": "this note"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -348,6 +348,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -383,6 +386,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -417,6 +423,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -451,6 +460,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -500,6 +512,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "sequence_diagram"
@ -598,6 +613,9 @@
"value": "a"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -769,6 +787,9 @@
"value": "b"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -816,6 +837,9 @@
"value": "group"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -874,6 +898,9 @@
"value": "t1"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -1005,6 +1032,9 @@
"value": "t1"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -1074,6 +1104,9 @@
"value": "t2"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -80,6 +80,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -129,6 +132,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -114,6 +114,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -163,6 +166,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"height": {
"value": "230"
},

View file

@ -217,6 +217,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -270,6 +273,9 @@
"value": "lemonchiffon"
}
},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -349,6 +355,9 @@
"value": "b"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "sql_table"
@ -396,6 +405,9 @@
"value": "d"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -156,6 +156,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -265,6 +268,9 @@
"value": "shape"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "sql_table"

View file

@ -87,6 +87,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -140,6 +143,9 @@
"value": "0"
}
},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -301,6 +301,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -342,6 +345,9 @@
"value": "true"
}
},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -454,6 +460,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "sql_table"
@ -564,6 +573,9 @@
"value": "a"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "sql_table"

View file

@ -153,6 +153,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -238,6 +241,9 @@
"value": "0.4"
}
},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "sql_table"

View file

@ -204,6 +204,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -292,6 +295,9 @@
"value": "blue"
}
},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "sql_table"

View file

@ -115,6 +115,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -150,6 +153,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -230,6 +236,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -288,6 +297,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -174,6 +174,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -209,6 +212,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -243,6 +249,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -354,6 +363,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -412,6 +424,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -470,6 +485,9 @@
"value": "z"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -181,6 +181,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -216,6 +219,9 @@
"value": "Can you imagine how life could be improved if we could do away with"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -250,6 +256,9 @@
"value": "Well, it's garish, ugly, and derelicts have used it for a toilet."
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -330,6 +339,9 @@
"value": "a"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -408,6 +420,9 @@
"value": "b"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -455,6 +470,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -186,6 +186,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -224,6 +227,9 @@
"value": "Well, it's garish, ugly, and derelicts have used it for a toilet."
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -273,6 +279,9 @@
"value": "a"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -320,6 +329,9 @@
"value": "b"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -367,6 +379,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -155,6 +155,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -190,6 +193,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -239,6 +245,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -317,6 +326,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -386,6 +398,9 @@
"value": "z"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -81,6 +81,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -130,6 +133,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -188,6 +194,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -110,6 +110,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -159,6 +162,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -206,6 +212,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -264,6 +273,9 @@
"value": "z"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -124,6 +124,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -173,6 +176,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -251,6 +257,9 @@
"value": "But it's real. And if it's real it can be affected ... we may not be able"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -124,6 +124,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -204,6 +207,9 @@
"value": "All we are given is possibilities -- to make ourselves one thing or another."
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -251,6 +257,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -121,6 +121,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -170,6 +173,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -217,6 +223,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -286,6 +295,9 @@
"value": "z"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -81,6 +81,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -130,6 +133,9 @@
"value": "x"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -188,6 +194,9 @@
"value": "y"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -41,6 +41,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -90,6 +93,9 @@
"value": "b\rb"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -30,7 +30,7 @@
"nodes": [
{
"map_key": {
"range": "d2/testdata/d2compiler/TestCompile/url_link.d2,1:2:7-1:26:31",
"range": "d2/testdata/d2compiler/TestCompile/url_link.d2,1:8:13-1:26:31",
"key": {
"range": "d2/testdata/d2compiler/TestCompile/url_link.d2,1:2:7-1:6:11",
"path": [
@ -80,6 +80,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -129,7 +132,9 @@
"value": "x"
},
"style": {},
"link": "https://google.com",
"link": {
"value": "https://google.com"
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -702,6 +702,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -739,6 +742,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -991,6 +997,9 @@
"value": "Chinchillas"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "sql_table"
@ -1157,6 +1166,9 @@
"value": "Chinchillas_Collectibles"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "sql_table"

View file

@ -307,6 +307,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -356,6 +359,9 @@
"value": "base"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -679,6 +685,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -728,6 +737,9 @@
"value": "santa"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -1051,6 +1063,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -1100,6 +1115,9 @@
"value": "clause"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -1423,6 +1441,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -1472,6 +1493,9 @@
"value": "reindeer"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -1795,6 +1819,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -1844,6 +1871,9 @@
"value": "montana"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"

View file

@ -174,6 +174,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -223,6 +226,9 @@
"value": "base"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -413,6 +419,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -462,6 +471,9 @@
"value": "santa"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"
@ -652,6 +664,9 @@
"value": ""
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": ""
@ -701,6 +716,9 @@
"value": "clause"
},
"style": {},
"link": {
"value": ""
},
"near_key": null,
"shape": {
"value": "rectangle"