tree-sitter-d2/test/old_corpus/attributes.txt

110 lines
2.9 KiB
Text

================================================================================
Root attribute
================================================================================
direction: value
--------------------------------------------------------------------------------
(source_file
(attr_key) (attr_value)
)
================================================================================
Block shape attribute
================================================================================
foo: {
shape: oval
foo.bar.baz: {
shape: oval
}
}
--------------------------------------------------------------------------------
(source_file
(shape_key)
(block
(attr_key) (attr_value)
(container_key) (dot) (container_key) (dot) (shape_key)
(block
(attr_key) (attr_value)
)
)
)
================================================================================
Inline shape attribute
================================================================================
foo.shape: oval
foo.bar.baz.shape: oval
--------------------------------------------------------------------------------
(source_file
(shape_key) (dot) (attr_key) (attr_value)
(container_key) (dot) (container_key) (dot) (shape_key) (dot) (attr_key) (attr_value)
)
================================================================================
Inline style attribute
================================================================================
foo.style.opacity: 5
--------------------------------------------------------------------------------
(source_file
(shape_key) (dot) (attr_key) (dot) (attr_key) (attr_value)
)
================================================================================
Block style attributes
================================================================================
foo.style: {
opacity: 5
fill: red;
}
--------------------------------------------------------------------------------
(source_file
(shape_key) (dot) (attr_key)
(block
(attr_key) (attr_value)
(attr_key) (attr_value)
)
)
================================================================================
Inline block style attributes
================================================================================
foo.style: { opacity: 5; fill: red; }
foo.style: { opacity: 5 }
--------------------------------------------------------------------------------
(source_file
(shape_key) (dot) (attr_key)
(block
(attr_key) (attr_value)
(attr_key) (attr_value)
)
(shape_key) (dot) (attr_key)
(block
(attr_key) (attr_value)
)
)
================================================================================
Color in string
================================================================================
foo.style.fill: "#ffffff";
--------------------------------------------------------------------------------
(source_file
(shape_key) (dot) (attr_key) (dot) (attr_key) (attr_value (string))
)