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

198 lines
3.9 KiB
Text

================================================================================
Simple connection
================================================================================
foo--bar
biz->baz
biz<->baz
biz<-baz
--------------------------------------------------------------------------------
(source_file
(connection
(shape_key)
(arrow)
(shape_key)
)
(connection
(shape_key)
(arrow)
(shape_key)
)
(connection
(shape_key)
(arrow)
(shape_key)
)
(connection
(shape_key)
(arrow)
(shape_key)
)
)
================================================================================
Formatted connection
================================================================================
foo -- bar
biz -> baz
biz <-> baz
biz <- baz
--------------------------------------------------------------------------------
(source_file
(connection
(shape_key)
(arrow)
(shape_key)
)
(connection
(shape_key)
(arrow)
(shape_key)
)
(connection
(shape_key)
(arrow)
(shape_key)
)
(connection
(shape_key)
(arrow)
(shape_key)
)
)
================================================================================
Connection with looooong arrow
================================================================================
foo ----------- bar
biz ----------> baz
biz <---------> baz
biz <---------- baz
--------------------------------------------------------------------------------
(source_file
(connection
(shape_key)
(arrow)
(shape_key)
)
(connection
(shape_key)
(arrow)
(shape_key)
)
(connection
(shape_key)
(arrow)
(shape_key)
)
(connection
(shape_key)
(arrow)
(shape_key)
)
)
================================================================================
Complex identifier connection
================================================================================
Foo Bar -- Biz Baz
-Bar-Foo- <- -Baz-Biz-
--------------------------------------------------------------------------------
(source_file
(connection
(shape_key)
(arrow)
(shape_key)
)
(connection
(shape_key)
(arrow)
(shape_key)
)
)
================================================================================
Inline connection
================================================================================
foo--bar->biz->baz
--------------------------------------------------------------------------------
(source_file
(connection
(shape_key)
(arrow)
(shape_key)
(arrow)
(shape_key)
(arrow)
(shape_key)
)
)
================================================================================
Many connections inline
================================================================================
foo--bar;biz->baz
--------------------------------------------------------------------------------
(source_file
(connection
(shape_key)
(arrow)
(shape_key)
)
(connection
(shape_key)
(arrow)
(shape_key)
)
)
================================================================================
Labeled connections
================================================================================
foo--bar: Question?
bar -> baz: Yes
--------------------------------------------------------------------------------
(source_file
(connection
(shape_key)
(arrow)
(shape_key)
(label)
)
(connection
(shape_key)
(arrow)
(shape_key)
(label)
)
)
================================================================================
Connection of shapes inside a containers
================================================================================
foo.biz.baz -> bar.baz.biz: Label
--------------------------------------------------------------------------------
(source_file
(connection
(container_key) (dot) (container_key) (dot) (shape_key)
(arrow)
(container_key) (dot) (container_key) (dot) (shape_key)
(label)
)
)