mirror of https://github.com/kdl-org/kdl.git
spec out slashdash comments
Fixes: https://github.com/kdl-org/kdl/issues/22
This commit is contained in:
parent
3cdd8437e3
commit
cc45c98562
16
README.md
16
README.md
|
|
@ -95,6 +95,22 @@ bignum 1_000_000
|
|||
my-hex 0xdeadbeef
|
||||
my-octal 0o755
|
||||
my-binary 0b1010_1101
|
||||
|
||||
// You can comment out individual nodes with /-. In the case below, everything
|
||||
// up until the closing `}` becomes commented.
|
||||
/-mynode "foo" key=1 {
|
||||
a
|
||||
b
|
||||
c
|
||||
}
|
||||
|
||||
// You can apply /- ("slashdash") comments to individual values, properties,
|
||||
// or child blocks, too:
|
||||
mynode /-"commented" "not commented" /-key="value" /-{
|
||||
a
|
||||
b
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
The following SDLang features are removed altogether:
|
||||
|
|
|
|||
3
SPEC.md
3
SPEC.md
|
|
@ -45,8 +45,9 @@ linespace := newline | ws | single-line-comment
|
|||
|
||||
newline := ('\r' '\n') | '\n'
|
||||
|
||||
ws := bom | ' ' | '\t' | multi-line-comment
|
||||
ws := bom | ' ' | '\t' | multi-line-comment | slashdash-comment
|
||||
|
||||
single-line-comment := '//' ('\r' [^\n] | [^\r\n])* newline
|
||||
multi-line-comment := '/*' ('*' [^\/] | [^*])* '*/'
|
||||
slashdash-comment := '/-' (node | value | prop | node-children)
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in New Issue