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

135 lines
2.9 KiB
Plaintext
Raw Normal View History

2022-12-06 00:34:41 +03:00
================================================================================
2022-12-09 09:00:07 +03:00
Simple shape key
2022-12-06 00:34:41 +03:00
================================================================================
2022-12-09 09:00:07 +03:00
foo
bar
2022-12-04 18:35:50 +03:00
2022-12-06 00:34:41 +03:00
--------------------------------------------------------------------------------
2022-12-04 18:35:50 +03:00
(source_file
2022-12-09 09:00:07 +03:00
(shape_key)
(shape_key)
2022-12-04 18:35:50 +03:00
)
2022-12-07 18:52:19 +03:00
================================================================================
2022-12-09 09:00:07 +03:00
Complex shape key
2022-12-07 18:52:19 +03:00
================================================================================
2022-12-09 09:00:07 +03:00
Foo bar
-Biz-baz-
2022-12-07 18:52:19 +03:00
--------------------------------------------------------------------------------
(source_file
2022-12-07 23:14:25 +03:00
(shape_key)
2022-12-09 09:00:07 +03:00
(shape_key)
2022-12-07 18:52:19 +03:00
)
2022-12-09 09:00:07 +03:00
================================================================================
Use quoted string as a shape key
================================================================================
'foo'
--------------------------------------------------------------------------------
(source_file
(shape_key (string))
)
2022-12-07 18:52:19 +03:00
2022-12-06 00:34:41 +03:00
================================================================================
2022-12-09 09:00:07 +03:00
Define multiple shapes using semicolons
2022-12-06 00:34:41 +03:00
================================================================================
2022-12-09 09:00:07 +03:00
a;b;c
2022-12-04 23:45:53 +03:00
2022-12-06 00:34:41 +03:00
--------------------------------------------------------------------------------
2022-12-04 23:45:53 +03:00
(source_file
2022-12-09 09:00:07 +03:00
(shape_key)
(shape_key)
(shape_key)
2022-12-04 23:45:53 +03:00
)
2022-12-06 00:34:41 +03:00
================================================================================
2022-12-09 09:00:07 +03:00
Labeled shapes
2022-12-06 00:34:41 +03:00
================================================================================
2022-12-09 09:00:07 +03:00
a: Foo Bar
a: Foo Bar; b: Biz Baz
2022-12-04 23:45:53 +03:00
2022-12-06 00:34:41 +03:00
--------------------------------------------------------------------------------
2022-12-04 23:45:53 +03:00
(source_file
2022-12-09 09:00:07 +03:00
(shape_key) (label)
(shape_key) (label)
(shape_key) (label)
2022-12-04 23:45:53 +03:00
)
2022-12-06 11:57:59 +03:00
================================================================================
2022-12-09 09:00:07 +03:00
It should skip white spaces
2022-12-06 11:57:59 +03:00
================================================================================
2022-12-06 12:32:50 +03:00
2022-12-09 09:00:07 +03:00
foo
bar : Foo Bar; baz
2022-12-06 11:57:59 +03:00
--------------------------------------------------------------------------------
(source_file
2022-12-09 09:00:07 +03:00
(shape_key)
(shape_key) (label)
(shape_key)
2022-12-06 11:57:59 +03:00
)
================================================================================
2022-12-09 09:00:07 +03:00
Shape block
2022-12-06 11:57:59 +03:00
================================================================================
2022-12-09 09:00:07 +03:00
foo: {
bar: {
baz: {
biz
}
}
}
2022-12-06 11:57:59 +03:00
--------------------------------------------------------------------------------
(source_file
2022-12-09 09:00:07 +03:00
(shape_key)
2022-12-07 23:14:25 +03:00
(block
2022-12-09 09:00:07 +03:00
(shape_key)
(block
(shape_key)
(block
(shape_key)
)
)
2022-12-06 11:57:59 +03:00
)
)
2022-12-08 02:04:36 +03:00
================================================================================
2022-12-09 09:00:07 +03:00
Aliased shape block
2022-12-08 02:04:36 +03:00
================================================================================
2022-12-09 09:00:07 +03:00
foo: Foo {
bar: Bar {
baz: Baz {
biz: Biz
}
}
}
2022-12-08 02:04:36 +03:00
--------------------------------------------------------------------------------
(source_file
2022-12-09 09:00:07 +03:00
(shape_key) (label)
(block
(shape_key) (label)
(block
(shape_key) (label)
(block
(shape_key) (label)
)
)
)
2022-12-08 02:04:36 +03:00
)