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

107 lines
2.8 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))
)
================================================================================
Shape block
================================================================================
foo: {}
bar {}
--------------------------------------------------------------------------------
(source_file
(shape (shape_key) (block))
(shape (shape_key) (block))
)
================================================================================
Labeled shape block
================================================================================
foo: Foo {}
--------------------------------------------------------------------------------
(source_file
(shape (shape_key) (label) (block))
)