get rid of syntactically significant unicode equals signs

Fixes: #399
This commit is contained in:
Kat Marchán 2024-10-05 14:31:31 -07:00
parent fa3050ccc0
commit 1e40ac66a4
No known key found for this signature in database
GPG Key ID: AEB529C08A3C7E9E
1 changed files with 4 additions and 10 deletions

14
SPEC.md
View File

@ -133,14 +133,11 @@ make it act as plain whitespace, even if it spreads across multiple lines.
#### 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 |
|----|-----|----|
| EQUALS SIGN | `=` | `U+003D` |
| SMALL EQUALS SIGN | `﹦` | `U+FE66` |
| FULLWIDTH EQUALS SIGN | `` | `U+FF1D` |
| HEAVY EQUALS SIGN | `🟰` | `U+1F7F0` |
### Argument
@ -334,8 +331,7 @@ negative number.
The following characters cannot be used anywhere in a [Identifier String](#identifier-string):
* Any of `(){}[]/\"#;`
* Any [Equals Sign](#equals-sign)
* Any of `(){}[]/\"#;=`
* Any [Whitespace](#whitespace) or [Newline](#newline).
* Any [disallowed literal code points](#disallowed-literal-code-points) in KDL
documents.
@ -780,19 +776,17 @@ node-prop-or-arg := prop | value
node-children := '{' nodes final-node? '}'
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)
type := '(' optional-node-space string optional-node-space ')'
equals-sign := See Table ([Equals Sign](#equals-sign))
string := identifier-string | quoted-string | raw-string
identifier-string := unambiguous-ident | signed-ident | dotted-ident
unambiguous-ident := ((identifier-char - digit - sign - '.') identifier-char*) - 'true' - 'false' - 'null' - 'inf' - '-inf' - 'nan'
signed-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*) '"'
single-line-string-body := (string-character - newline)*