change
This commit is contained in:
parent
641a6741ff
commit
6f81e9b96b
2 changed files with 17 additions and 17 deletions
|
|
@ -285,19 +285,19 @@ func (c *compiler) compileReserved(attrs *d2graph.Attributes, f *d2ir.Field) {
|
|||
attrs.Height = &d2graph.Scalar{}
|
||||
attrs.Height.Value = scalar.ScalarString()
|
||||
attrs.Height.MapKey = f.LastPrimaryKey()
|
||||
case "top":
|
||||
case "position-top":
|
||||
_, err := strconv.Atoi(scalar.ScalarString())
|
||||
if err != nil {
|
||||
c.errorf(scalar, "non-integer top %#v: %s", scalar.ScalarString(), err)
|
||||
c.errorf(scalar, "non-integer position-top %#v: %s", scalar.ScalarString(), err)
|
||||
return
|
||||
}
|
||||
attrs.Top = &d2graph.Scalar{}
|
||||
attrs.Top.Value = scalar.ScalarString()
|
||||
attrs.Top.MapKey = f.LastPrimaryKey()
|
||||
case "left":
|
||||
case "position-left":
|
||||
_, err := strconv.Atoi(scalar.ScalarString())
|
||||
if err != nil {
|
||||
c.errorf(scalar, "non-integer left %#v: %s", scalar.ScalarString(), err)
|
||||
c.errorf(scalar, "non-integer position-left %#v: %s", scalar.ScalarString(), err)
|
||||
return
|
||||
}
|
||||
attrs.Left = &d2graph.Scalar{}
|
||||
|
|
|
|||
|
|
@ -1433,19 +1433,19 @@ var ReservedKeywords2 map[string]struct{}
|
|||
|
||||
// Non Style/Holder keywords.
|
||||
var SimpleReservedKeywords = map[string]struct{}{
|
||||
"label": {},
|
||||
"desc": {},
|
||||
"shape": {},
|
||||
"icon": {},
|
||||
"constraint": {},
|
||||
"tooltip": {},
|
||||
"link": {},
|
||||
"near": {},
|
||||
"width": {},
|
||||
"height": {},
|
||||
"direction": {},
|
||||
"top": {},
|
||||
"left": {},
|
||||
"label": {},
|
||||
"desc": {},
|
||||
"shape": {},
|
||||
"icon": {},
|
||||
"constraint": {},
|
||||
"tooltip": {},
|
||||
"link": {},
|
||||
"near": {},
|
||||
"width": {},
|
||||
"height": {},
|
||||
"direction": {},
|
||||
"position-top": {},
|
||||
"position-left": {},
|
||||
}
|
||||
|
||||
// ReservedKeywordHolders are reserved keywords that are meaningless on its own and exist solely to hold a set of reserved keywords
|
||||
|
|
|
|||
Loading…
Reference in a new issue