mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-30 12:51:10 +00:00
Test: tested multi-line comments are recognized
This commit is contained in:
parent
2b9d82e07e
commit
abae84af56
2 changed files with 15 additions and 3 deletions
|
@ -1,5 +1,13 @@
|
|||
# 基本的な構文をパーサーがパスできるかチェックする
|
||||
# Check that a parser can pass the basic syntax
|
||||
#[
|
||||
基本的な構文をパーサーがパスできるかチェックする
|
||||
Check that a parser can pass the basic syntax
|
||||
#[
|
||||
`#[`から`]#`までが複数行コメントとして扱われる
|
||||
コメント内部で入れ子で複数行コメントを付けれるが、閉じ忘れに注意
|
||||
The comment from `#[` to `]#` is treated as a multi-line comment.
|
||||
Nested multi-line comments can be added inside comments, but be careful not to forget to close them.
|
||||
]#
|
||||
]#
|
||||
|
||||
_a = 1_234 + 1113.* 3_000.2e-4 ** 0003 * .4
|
||||
a, _, ...b = five_elem_tuple
|
||||
|
@ -7,6 +15,10 @@ f x, y =
|
|||
x + y
|
||||
if! True, do!:
|
||||
print! "\"\\hello, world\\\""
|
||||
#[
|
||||
indented comment
|
||||
dedented comment
|
||||
]#
|
||||
10.times! do!:
|
||||
if! x.y.z, do!:
|
||||
print! ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue