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

150 lines
2.9 KiB
Text
Raw Normal View History

2022-12-06 00:34:41 +03:00
================================================================================
2022-12-04 03:21:42 +03:00
Simple connection
2022-12-06 00:34:41 +03:00
================================================================================
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
2022-12-06 00:34:41 +03:00
--------------------------------------------------------------------------------
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-06 00:34:41 +03:00
================================================================================
2022-12-04 18:35:37 +03:00
Formatted connection
2022-12-06 00:34:41 +03:00
================================================================================
2022-12-04 18:35:37 +03:00
foo -- bar
biz -> baz
biz <-> baz
biz <- baz
2022-12-06 00:34:41 +03:00
--------------------------------------------------------------------------------
2022-12-04 18:35:37 +03:00
(source_file
(connection
(identifier)
(arrow)
(identifier)
)
(connection
(identifier)
(arrow)
(identifier)
)
(connection
(identifier)
(arrow)
(identifier)
)
(connection
(identifier)
(arrow)
(identifier)
)
)
2022-12-06 00:34:41 +03:00
================================================================================
2022-12-04 03:21:42 +03:00
Complex identifier connection
2022-12-06 00:34:41 +03:00
================================================================================
2022-12-04 03:21:42 +03:00
Foo Bar -- Biz Baz
-Bar-Foo- <- -Baz-Biz-
2022-12-06 00:34:41 +03:00
--------------------------------------------------------------------------------
2022-12-04 03:21:42 +03:00
(source_file
(connection
(identifier)
(arrow)
(identifier)
)
(connection
(identifier)
(arrow)
(identifier)
)
)
2022-12-06 00:34:41 +03:00
================================================================================
2022-12-04 03:21:42 +03:00
Inline connection
2022-12-06 00:34:41 +03:00
================================================================================
2022-12-04 03:21:42 +03:00
foo--bar->biz->baz
2022-12-06 00:34:41 +03:00
--------------------------------------------------------------------------------
2022-12-04 03:21:42 +03:00
(source_file
(connection
(identifier)
(arrow)
(identifier)
(arrow)
(identifier)
(arrow)
(identifier)
)
)
2022-12-04 03:25:38 +03:00
2022-12-06 00:34:41 +03:00
================================================================================
2022-12-04 03:27:27 +03:00
Many connections inline
2022-12-06 00:34:41 +03:00
================================================================================
2022-12-04 03:27:27 +03:00
foo--bar;biz->baz
2022-12-06 00:34:41 +03:00
--------------------------------------------------------------------------------
2022-12-04 03:27:27 +03:00
(source_file
(connection
(identifier)
(arrow)
(identifier)
)
(connection
(identifier)
(arrow)
(identifier)
)
)
2022-12-06 00:34:41 +03:00
================================================================================
Labeled connections
================================================================================
2022-12-04 03:25:38 +03:00
foo--bar: Question?
2022-12-06 00:34:41 +03:00
bar -> baz: Yes
2022-12-04 03:25:38 +03:00
2022-12-06 00:34:41 +03:00
--------------------------------------------------------------------------------
2022-12-04 03:25:38 +03:00
(source_file
(connection
(identifier)
(arrow)
(identifier)
(label)
)
(connection
(identifier)
(arrow)
(identifier)
(label)
)
)