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

150 lines
2.9 KiB
Plaintext

================================================================================
Simple connection
================================================================================
foo--bar
biz->baz
biz<->baz
biz<-baz
--------------------------------------------------------------------------------
(source_file
(connection
(identifier)
(arrow)
(identifier)
)
(connection
(identifier)
(arrow)
(identifier)
)
(connection
(identifier)
(arrow)
(identifier)
)
(connection
(identifier)
(arrow)
(identifier)
)
)
================================================================================
Formatted connection
================================================================================
foo -- bar
biz -> baz
biz <-> baz
biz <- baz
--------------------------------------------------------------------------------
(source_file
(connection
(identifier)
(arrow)
(identifier)
)
(connection
(identifier)
(arrow)
(identifier)
)
(connection
(identifier)
(arrow)
(identifier)
)
(connection
(identifier)
(arrow)
(identifier)
)
)
================================================================================
Complex identifier connection
================================================================================
Foo Bar -- Biz Baz
-Bar-Foo- <- -Baz-Biz-
--------------------------------------------------------------------------------
(source_file
(connection
(identifier)
(arrow)
(identifier)
)
(connection
(identifier)
(arrow)
(identifier)
)
)
================================================================================
Inline connection
================================================================================
foo--bar->biz->baz
--------------------------------------------------------------------------------
(source_file
(connection
(identifier)
(arrow)
(identifier)
(arrow)
(identifier)
(arrow)
(identifier)
)
)
================================================================================
Many connections inline
================================================================================
foo--bar;biz->baz
--------------------------------------------------------------------------------
(source_file
(connection
(identifier)
(arrow)
(identifier)
)
(connection
(identifier)
(arrow)
(identifier)
)
)
================================================================================
Labeled connections
================================================================================
foo--bar: Question?
bar -> baz: Yes
--------------------------------------------------------------------------------
(source_file
(connection
(identifier)
(arrow)
(identifier)
(label)
)
(connection
(identifier)
(arrow)
(identifier)
(label)
)
)