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

98 lines
2.1 KiB
Text
Raw Normal View History

2022-12-09 09:00:07 +03:00
================================================================================
Declare a shape inside a container
================================================================================
foo.baz
--------------------------------------------------------------------------------
(source_file
(container_key) (dot) (shape_key)
)
================================================================================
Use quoted string as a shape key
================================================================================
'foo'.'baz'
--------------------------------------------------------------------------------
(source_file
(container_key (string)) (dot) (shape_key (string))
)
================================================================================
Declare container inside a container using block
================================================================================
foo: {
bar: {
baz: {
biz
}
}
}
--------------------------------------------------------------------------------
(source_file
(shape_key)
(block
(shape_key)
(block
(shape_key)
(block
(shape_key)
)
)
)
)
================================================================================
Declare labaled container inside a labeled container using block
================================================================================
foo: Foo {
bar: Bar {
baz: Baz {
biz: Biz
}
}
}
--------------------------------------------------------------------------------
(source_file
(shape_key) (label)
(block
(shape_key) (label)
(block
(shape_key) (label)
(block
(shape_key) (label)
)
)
)
)
================================================================================
Declare many shapes inside a container
================================================================================
foo: {
bar
biz
baz
}
--------------------------------------------------------------------------------
(source_file
(shape_key)
(block
(shape_key)
(shape_key)
(shape_key)
)
)