fix definition many shapes inside a container

This commit is contained in:
Dmitriy Pleshevskiy 2022-12-08 02:09:04 +03:00
parent 90bb1822c1
commit 9693327741
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
4 changed files with 22 additions and 7 deletions

View file

@ -96,9 +96,7 @@ module.exports = grammar({
seq( seq(
spaces, spaces,
"{", "{",
repeat( repeat(choice($._emptyline, seq(spaces, $._shape_block_definition))),
choice($._emptyline, seq(spaces, $._shape_block_definition, $._end))
),
optional(seq($._shape_block_definition, optional($._end))), optional(seq($._shape_block_definition, optional($._end))),
spaces, spaces,
"}" "}"

View file

@ -527,10 +527,6 @@
{ {
"type": "SYMBOL", "type": "SYMBOL",
"name": "_shape_block_definition" "name": "_shape_block_definition"
},
{
"type": "SYMBOL",
"name": "_end"
} }
] ]
} }

Binary file not shown.

View file

@ -74,3 +74,24 @@ foo: Foo {
) )
) )
================================================================================
Declare many shapes inside a container
================================================================================
foo: {
bar
biz
baz
}
--------------------------------------------------------------------------------
(source_file
(shape_key)
(block
(shape_key)
(shape_key)
(shape_key)
)
)