tree-sitter-d2/test/corpus/shape.txt

92 lines
2.5 KiB
Plaintext

================================================================================
Simple shape key
================================================================================
foo
bar
--------------------------------------------------------------------------------
(source_file
(shape (shape_key))
(shape (shape_key))
)
================================================================================
Complex shape key
================================================================================
Foo bar
-Biz-baz-
--------------------------------------------------------------------------------
(source_file
(shape (shape_key))
(shape (shape_key))
)
================================================================================
Use quoted string as a shape key
================================================================================
'foo'
--------------------------------------------------------------------------------
(source_file
(shape (shape_key (string)))
)
================================================================================
Define multiple shapes using semicolons
================================================================================
a;b;c
--------------------------------------------------------------------------------
(source_file
(shape (shape_key))
(shape (shape_key))
(shape (shape_key))
)
================================================================================
Labeled shapes
================================================================================
a: Foo Bar
a: Foo Bar; b: Biz Baz
--------------------------------------------------------------------------------
(source_file
(shape (shape_key) (label))
(shape (shape_key) (label))
(shape (shape_key) (label))
)
================================================================================
It should skip white spaces
================================================================================
foo
bar : Foo Bar; baz
--------------------------------------------------------------------------------
(source_file
(shape (shape_key))
(shape (shape_key) (label))
(shape (shape_key))
)
================================================================================
Use quoted string as shape key and label
================================================================================
'foo': "Label"
--------------------------------------------------------------------------------
(source_file
(shape (shape_key (string)) (label (string)))
)