Add structure for container and shapes #1

Merged
pleshevskiy merged 12 commits from rewrite-structure into main 2022-12-09 12:36:32 +03:00
4 changed files with 31 additions and 1 deletions
Showing only changes of commit 1ea16740eb - Show all commits

View file

@ -111,7 +111,7 @@ module.exports = grammar({
_new_container_block_definition: ($) =>
prec(
PREC.CONTAINER,
choice($._eol, seq(choice($.shape, $.container), $._end))
choice($._eol, seq(choice($.shape, $.container, $.connection), $._end))
),
// --------------------------------------------

View file

@ -428,6 +428,10 @@
{
"type": "SYMBOL",
"name": "container"
},
{
"type": "SYMBOL",
"name": "connection"
}
]
},

Binary file not shown.

View file

@ -196,3 +196,29 @@ foo.biz.baz -> bar.baz.biz: Label
(label)
)
)
================================================================================
Connection of shapes inside a block of container
================================================================================
foo.baz: {
foo -> biz: Label
}
--------------------------------------------------------------------------------
(source_file
(container
(container_key) (dot)
(container
(container_key)
(block
(connection
(shape_key)
(arrow)
(shape_key)
(label)
)
)
)
)
)