2022-12-09 12:54:11 +03:00
|
|
|
================================================================================
|
|
|
|
Handle end of file (issue #1)
|
|
|
|
================================================================================
|
|
|
|
foo
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(shape (shape_key))
|
|
|
|
)
|
|
|
|
|
2022-12-06 00:34:41 +03:00
|
|
|
================================================================================
|
2022-12-07 23:22:40 +03:00
|
|
|
Simple shape key
|
2022-12-06 00:34:41 +03:00
|
|
|
================================================================================
|
2022-12-04 00:07:26 +03:00
|
|
|
foo
|
2022-12-04 03:13:40 +03:00
|
|
|
bar
|
2022-12-04 00:07:26 +03:00
|
|
|
|
2022-12-06 00:34:41 +03:00
|
|
|
--------------------------------------------------------------------------------
|
2022-12-04 00:07:26 +03:00
|
|
|
|
2022-12-04 03:13:40 +03:00
|
|
|
(source_file
|
2022-12-09 12:36:31 +03:00
|
|
|
(shape (shape_key))
|
|
|
|
(shape (shape_key))
|
2022-12-04 03:13:40 +03:00
|
|
|
)
|
2022-12-04 00:07:26 +03:00
|
|
|
|
2022-12-06 00:34:41 +03:00
|
|
|
================================================================================
|
2022-12-07 23:22:40 +03:00
|
|
|
Complex shape key
|
2022-12-06 00:34:41 +03:00
|
|
|
================================================================================
|
2022-12-04 03:13:40 +03:00
|
|
|
Foo bar
|
|
|
|
-Biz-baz-
|
2022-12-09 15:02:21 +03:00
|
|
|
imAShape
|
2022-12-09 23:44:43 +03:00
|
|
|
im_a$_shape
|
2022-12-09 15:02:21 +03:00
|
|
|
im a shape
|
|
|
|
i'm a shape
|
|
|
|
a-shape
|
2022-12-09 23:44:43 +03:00
|
|
|
changeTeam(member, props, ctx)
|
2022-12-04 00:07:26 +03:00
|
|
|
|
2022-12-06 00:34:41 +03:00
|
|
|
--------------------------------------------------------------------------------
|
2022-12-04 00:07:26 +03:00
|
|
|
|
|
|
|
(source_file
|
2022-12-09 12:36:31 +03:00
|
|
|
(shape (shape_key))
|
|
|
|
(shape (shape_key))
|
2022-12-09 15:02:21 +03:00
|
|
|
(shape (shape_key))
|
|
|
|
(shape (shape_key))
|
|
|
|
(shape (shape_key))
|
|
|
|
(shape (shape_key))
|
|
|
|
(shape (shape_key))
|
2022-12-09 23:44:43 +03:00
|
|
|
(shape (shape_key))
|
2022-12-04 03:13:40 +03:00
|
|
|
)
|
|
|
|
|
2022-12-07 23:14:25 +03:00
|
|
|
================================================================================
|
|
|
|
Use quoted string as a shape key
|
|
|
|
================================================================================
|
2022-12-07 23:22:40 +03:00
|
|
|
'foo'
|
2022-12-07 23:14:25 +03:00
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
2022-12-10 05:23:27 +03:00
|
|
|
(shape (shape_key (string (string_fragment))))
|
2022-12-07 23:14:25 +03:00
|
|
|
)
|
2022-12-04 00:07:26 +03:00
|
|
|
|
2022-12-11 14:16:23 +03:00
|
|
|
================================================================================
|
|
|
|
Use escape sequence in quoted string as a shape key
|
|
|
|
================================================================================
|
|
|
|
'\# hello \# world'
|
|
|
|
|
|
|
|
"\# hello \# world"
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(shape (shape_key (string (string_fragment))))
|
|
|
|
(shape (shape_key (string
|
|
|
|
(escape_sequence)
|
|
|
|
(string_fragment)
|
|
|
|
(escape_sequence)
|
|
|
|
(string_fragment)
|
|
|
|
)))
|
|
|
|
)
|
|
|
|
|
2022-12-06 00:34:41 +03:00
|
|
|
================================================================================
|
2022-12-07 23:14:25 +03:00
|
|
|
Define multiple shapes using semicolons
|
2022-12-06 00:34:41 +03:00
|
|
|
================================================================================
|
2022-12-04 03:13:40 +03:00
|
|
|
a;b;c
|
2022-12-04 00:07:26 +03:00
|
|
|
|
2022-12-06 00:34:41 +03:00
|
|
|
--------------------------------------------------------------------------------
|
2022-12-04 00:07:26 +03:00
|
|
|
|
|
|
|
(source_file
|
2022-12-09 12:36:31 +03:00
|
|
|
(shape (shape_key))
|
|
|
|
(shape (shape_key))
|
|
|
|
(shape (shape_key))
|
2022-12-04 03:13:40 +03:00
|
|
|
)
|
2022-12-04 00:07:26 +03:00
|
|
|
|
2022-12-06 00:34:41 +03:00
|
|
|
================================================================================
|
2022-12-07 23:22:40 +03:00
|
|
|
Labeled shapes
|
2022-12-06 00:34:41 +03:00
|
|
|
================================================================================
|
2022-12-04 03:13:40 +03:00
|
|
|
a: Foo Bar
|
|
|
|
a: Foo Bar; b: Biz Baz
|
2022-12-04 00:07:26 +03:00
|
|
|
|
2022-12-06 00:34:41 +03:00
|
|
|
--------------------------------------------------------------------------------
|
2022-12-04 00:07:26 +03:00
|
|
|
|
|
|
|
(source_file
|
2022-12-09 12:36:31 +03:00
|
|
|
(shape (shape_key) (label))
|
|
|
|
(shape (shape_key) (label))
|
|
|
|
(shape (shape_key) (label))
|
2022-12-04 03:13:40 +03:00
|
|
|
)
|
2022-12-04 00:07:26 +03:00
|
|
|
|
2023-01-05 16:53:32 +03:00
|
|
|
================================================================================
|
|
|
|
Label with escape sequence
|
|
|
|
================================================================================
|
|
|
|
a: Foo\nB\#ar
|
|
|
|
a: Foo\nB\@r; b: Biz\nBaz
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(shape (shape_key) (label (escape_sequence) (escape_sequence)))
|
|
|
|
(shape (shape_key) (label (escape_sequence) (escape_sequence)))
|
|
|
|
(shape (shape_key) (label (escape_sequence)))
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2022-12-06 00:53:06 +03:00
|
|
|
================================================================================
|
|
|
|
It should skip white spaces
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
foo
|
|
|
|
|
|
|
|
bar : Foo Bar; baz
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
2022-12-09 12:36:31 +03:00
|
|
|
(shape (shape_key))
|
|
|
|
(shape (shape_key) (label))
|
|
|
|
(shape (shape_key))
|
2022-12-06 00:53:06 +03:00
|
|
|
)
|
|
|
|
|
2022-12-06 12:32:50 +03:00
|
|
|
================================================================================
|
2022-12-09 12:36:31 +03:00
|
|
|
Use quoted string as shape key and label
|
2022-12-06 12:32:50 +03:00
|
|
|
================================================================================
|
2022-12-09 12:36:31 +03:00
|
|
|
'foo': "Label"
|
2022-12-06 12:41:41 +03:00
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
2022-12-10 05:23:27 +03:00
|
|
|
(shape
|
|
|
|
(shape_key (string (string_fragment)))
|
|
|
|
(label (string (string_fragment))))
|
2022-12-06 12:41:41 +03:00
|
|
|
)
|
2022-12-07 18:52:19 +03:00
|
|
|
|
2022-12-09 16:08:41 +03:00
|
|
|
================================================================================
|
|
|
|
Basic text block
|
|
|
|
================================================================================
|
|
|
|
foo: |
|
|
|
|
- hello
|
|
|
|
|
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(shape
|
|
|
|
(shape_key)
|
|
|
|
(text_block
|
2022-12-09 18:21:55 +03:00
|
|
|
(raw_text)
|
2022-12-09 16:08:41 +03:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Text block with specific language
|
|
|
|
================================================================================
|
|
|
|
foo: |go
|
|
|
|
|
|
|
|
awsSession := From(c.Request.Context())
|
|
|
|
|
|
|
|
client := s3.New(awsSession)
|
|
|
|
|
|
|
|
|
|
|
|
ctx, cancelFn := context.WithTimeout(c.Request.Context(), AWS_TIMEOUT)
|
|
|
|
|
|
|
|
defer cancelFn()
|
|
|
|
|
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(shape
|
|
|
|
(shape_key)
|
|
|
|
(text_block
|
|
|
|
(language)
|
2022-12-09 18:21:55 +03:00
|
|
|
(raw_text)
|
2022-12-09 16:08:41 +03:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
================================================================================
|
2022-12-11 14:16:23 +03:00
|
|
|
Text block with quotes (custom escape characters)
|
2022-12-09 16:08:41 +03:00
|
|
|
================================================================================
|
2022-12-11 14:16:23 +03:00
|
|
|
foo: |$$$go
|
2022-12-09 16:08:41 +03:00
|
|
|
|
|
|
|
awsSession := From(c.Request.Context())
|
|
|
|
|
|
|
|
client := s3.New(awsSession)
|
|
|
|
|
|
|
|
|
|
|
|
ctx, cancelFn := context.WithTimeout(c.Request.Context(), AWS_TIMEOUT)
|
|
|
|
|
|
|
|
defer cancelFn()
|
2022-12-11 14:16:23 +03:00
|
|
|
$$$|
|
2022-12-09 16:08:41 +03:00
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(shape
|
|
|
|
(shape_key)
|
|
|
|
(text_block
|
|
|
|
(language)
|
2022-12-09 18:21:55 +03:00
|
|
|
(raw_text)
|
2022-12-09 16:08:41 +03:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2022-12-10 22:56:41 +03:00
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Online text block
|
|
|
|
================================================================================
|
|
|
|
foo: | helo world |
|
|
|
|
|
2022-12-11 14:16:23 +03:00
|
|
|
bar: |##md ## hello world ##|
|
2022-12-10 22:56:41 +03:00
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(shape
|
|
|
|
(shape_key)
|
|
|
|
(text_block
|
|
|
|
(raw_text)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(shape
|
|
|
|
(shape_key)
|
|
|
|
(text_block
|
|
|
|
(language)
|
|
|
|
(raw_text)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2022-12-13 11:26:52 +03:00
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Shape with oneline comment
|
|
|
|
================================================================================
|
|
|
|
foo # hello
|
|
|
|
# world
|
|
|
|
bar
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(shape (shape_key))
|
|
|
|
(line_comment)
|
|
|
|
(line_comment)
|
|
|
|
(shape (shape_key))
|
|
|
|
)
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
Shape with block comment
|
|
|
|
================================================================================
|
|
|
|
foo
|
|
|
|
|
|
|
|
"""
|
|
|
|
hello world
|
|
|
|
"""
|
|
|
|
|
|
|
|
bar
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(shape (shape_key))
|
|
|
|
(block_comment)
|
|
|
|
(shape (shape_key))
|
|
|
|
)
|