Add structure for container and shapes #1
4 changed files with 31 additions and 1 deletions
|
@ -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))
|
||||
),
|
||||
|
||||
// --------------------------------------------
|
||||
|
|
|
@ -428,6 +428,10 @@
|
|||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "container"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "connection"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
BIN
src/parser.c
BIN
src/parser.c
Binary file not shown.
|
@ -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)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue