From 1e40ac66a43a14325c8a74b7b5f2205385c3fd76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Sat, 5 Oct 2024 14:31:31 -0700 Subject: [PATCH] get rid of syntactically significant unicode equals signs Fixes: #399 --- SPEC.md | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/SPEC.md b/SPEC.md index e09582a..5d1a5a2 100644 --- a/SPEC.md +++ b/SPEC.md @@ -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)*