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

156 lines
1.7 KiB
Text
Raw Normal View History

2022-12-04 00:07:26 +03:00
==================
2022-12-04 03:21:42 +03:00
Simple connection
2022-12-04 00:07:26 +03:00
==================
foo--bar
2022-12-04 03:21:42 +03:00
biz->baz
biz<->baz
biz<-baz
2022-12-04 00:07:26 +03:00
---
(source_file
(connection
2022-12-04 03:21:42 +03:00
(identifier)
2022-12-04 00:07:26 +03:00
(arrow)
2022-12-04 03:21:42 +03:00
(identifier)
)
(connection
(identifier)
(arrow)
(identifier)
)
(connection
(identifier)
(arrow)
(identifier)
)
(connection
(identifier)
(arrow)
(identifier)
)
)
2022-12-04 18:35:37 +03:00
==================
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)
)
)
2022-12-04 03:21:42 +03:00
=============================
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)
)
)
2022-12-04 03:25:38 +03:00
2022-12-04 03:27:27 +03:00
==================
Many connections inline
==================
foo--bar;biz->baz
---
(source_file
(connection
(identifier)
(arrow)
(identifier)
)
(connection
(identifier)
(arrow)
(identifier)
)
)
2022-12-04 03:25:38 +03:00
==================
Descripted connection
==================
foo--bar: Question?
bar->baz: Yes
---
(source_file
(connection
(identifier)
(arrow)
(identifier)
(label)
)
(connection
(identifier)
(arrow)
(identifier)
(label)
)
)