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

76 lines
774 B
Plaintext
Raw Normal View History

2022-12-04 00:07:26 +03:00
==================
2022-12-04 03:13:40 +03:00
Simple shape
2022-12-04 00:07:26 +03:00
==================
foo
2022-12-04 03:13:40 +03:00
bar
2022-12-04 00:07:26 +03:00
---
2022-12-04 03:13:40 +03:00
(source_file
(shape (identifier))
(shape (identifier))
)
2022-12-04 00:07:26 +03:00
==================
2022-12-04 03:13:40 +03:00
Complex identifier
2022-12-04 00:07:26 +03:00
==================
2022-12-04 03:13:40 +03:00
Foo bar
-Biz-baz-
2022-12-04 00:07:26 +03:00
---
(source_file
2022-12-04 03:13:40 +03:00
(shape (identifier))
(shape (identifier))
)
2022-12-04 03:36:46 +03:00
==================
Inline shapes
==================
foo.baz
---
(source_file
(shape
(identifier)
(dot)
(identifier)
)
)
2022-12-04 00:07:26 +03:00
==================
2022-12-04 03:27:27 +03:00
Many shapes inline
2022-12-04 00:07:26 +03:00
==================
2022-12-04 03:13:40 +03:00
a;b;c
2022-12-04 00:07:26 +03:00
---
(source_file
2022-12-04 03:27:54 +03:00
(shape (identifier))
(shape (identifier))
(shape (identifier))
2022-12-04 03:13:40 +03:00
)
2022-12-04 00:07:26 +03:00
==================
Aliased shapes
==================
2022-12-04 03:13:40 +03:00
a: Foo Bar
a: Foo Bar; b: Biz Baz
2022-12-04 00:07:26 +03:00
---
(source_file
2022-12-04 03:13:40 +03:00
(shape (identifier) (label))
(shape (identifier) (label))
(shape (identifier) (label))
)
2022-12-04 00:07:26 +03:00