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

156 lines
1.7 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)
)
)
==================
Descripted connection
==================
foo--bar: Question?
bar->baz: Yes
---
(source_file
(connection
(identifier)
(arrow)
(identifier)
(label)
)
(connection
(identifier)
(arrow)
(identifier)
(label)
)
)