Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get rid of syntactically significant unicode equals signs #400

Open
wants to merge 1 commit into
base: kdl-v2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Comment on lines 134 to -143
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to keep this section? It's has only one reference, in the previous section, that could be replaced with "equals sign (=, code point U+003D)". Regardless, the previous section might need to be reworded anyway (#401).


### Argument

Expand Down Expand Up @@ -332,8 +329,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.
Expand Down Expand Up @@ -774,19 +770,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)*
Expand Down