mirror of https://github.com/kdl-org/kdl.git
parent
fa3050ccc0
commit
1e40ac66a4
14
SPEC.md
14
SPEC.md
|
|
@ -133,14 +133,11 @@ make it act as plain whitespace, even if it spreads across multiple lines.
|
||||||
|
|
||||||
#### Equals Sign
|
#### Equals Sign
|
||||||
|
|
||||||
Any of the following characters may be used as equals signs in properties:
|
Only the following character may be used as equals signs in properties:
|
||||||
|
|
||||||
| Name | Character | Code Point |
|
| Name | Character | Code Point |
|
||||||
|----|-----|----|
|
|----|-----|----|
|
||||||
| EQUALS SIGN | `=` | `U+003D` |
|
| EQUALS SIGN | `=` | `U+003D` |
|
||||||
| SMALL EQUALS SIGN | `﹦` | `U+FE66` |
|
|
||||||
| FULLWIDTH EQUALS SIGN | `=` | `U+FF1D` |
|
|
||||||
| HEAVY EQUALS SIGN | `🟰` | `U+1F7F0` |
|
|
||||||
|
|
||||||
### Argument
|
### Argument
|
||||||
|
|
||||||
|
|
@ -334,8 +331,7 @@ negative number.
|
||||||
|
|
||||||
The following characters cannot be used anywhere in a [Identifier String](#identifier-string):
|
The following characters cannot be used anywhere in a [Identifier String](#identifier-string):
|
||||||
|
|
||||||
* Any of `(){}[]/\"#;`
|
* Any of `(){}[]/\"#;=`
|
||||||
* Any [Equals Sign](#equals-sign)
|
|
||||||
* Any [Whitespace](#whitespace) or [Newline](#newline).
|
* Any [Whitespace](#whitespace) or [Newline](#newline).
|
||||||
* Any [disallowed literal code points](#disallowed-literal-code-points) in KDL
|
* Any [disallowed literal code points](#disallowed-literal-code-points) in KDL
|
||||||
documents.
|
documents.
|
||||||
|
|
@ -780,19 +776,17 @@ node-prop-or-arg := prop | value
|
||||||
node-children := '{' nodes final-node? '}'
|
node-children := '{' nodes final-node? '}'
|
||||||
node-terminator := single-line-comment | newline | ';' | eof
|
node-terminator := single-line-comment | newline | ';' | eof
|
||||||
|
|
||||||
prop := string optional-node-space equals-sign optional-node-space value
|
prop := string optional-node-space '=' optional-node-space value
|
||||||
value := type? optional-node-space (string | number | keyword)
|
value := type? optional-node-space (string | number | keyword)
|
||||||
type := '(' optional-node-space string optional-node-space ')'
|
type := '(' optional-node-space string optional-node-space ')'
|
||||||
|
|
||||||
equals-sign := See Table ([Equals Sign](#equals-sign))
|
|
||||||
|
|
||||||
string := identifier-string | quoted-string | raw-string
|
string := identifier-string | quoted-string | raw-string
|
||||||
|
|
||||||
identifier-string := unambiguous-ident | signed-ident | dotted-ident
|
identifier-string := unambiguous-ident | signed-ident | dotted-ident
|
||||||
unambiguous-ident := ((identifier-char - digit - sign - '.') identifier-char*) - 'true' - 'false' - 'null' - 'inf' - '-inf' - 'nan'
|
unambiguous-ident := ((identifier-char - digit - sign - '.') identifier-char*) - 'true' - 'false' - 'null' - 'inf' - '-inf' - 'nan'
|
||||||
signed-ident := sign ((identifier-char - digit - '.') identifier-char*)?
|
signed-ident := sign ((identifier-char - digit - '.') identifier-char*)?
|
||||||
dotted-ident := sign? '.' ((identifier-char - digit) identifier-char*)?
|
dotted-ident := sign? '.' ((identifier-char - digit) identifier-char*)?
|
||||||
identifier-char := unicode - unicode-space - newline - [\\/(){};\[\]"#] - disallowed-literal-code-points - equals-sign
|
identifier-char := unicode - unicode-space - newline - [\\/(){};\[\]"#=] - disallowed-literal-code-points
|
||||||
|
|
||||||
quoted-string := '"' (single-line-string-body | newline multi-line-string-body newline unicode-space*) '"'
|
quoted-string := '"' (single-line-string-body | newline multi-line-string-body newline unicode-space*) '"'
|
||||||
single-line-string-body := (string-character - newline)*
|
single-line-string-body := (string-character - newline)*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue