mirror of https://github.com/kdl-org/kdl.git
allow ,<> as identifier characters since they no longer need to be reserved
This commit is contained in:
parent
ee032d3c59
commit
9c5a06117a
10
CHANGELOG.md
10
CHANGELOG.md
|
|
@ -8,8 +8,14 @@
|
||||||
* Single line comments (`//`) can now be immediately followed by a newline.
|
* Single line comments (`//`) can now be immediately followed by a newline.
|
||||||
* All literal whitespace following a `\` in a string is now discarded.
|
* All literal whitespace following a `\` in a string is now discarded.
|
||||||
* Vertical tabs (`U+000B`) are now considered to be whitespace.
|
* Vertical tabs (`U+000B`) are now considered to be whitespace.
|
||||||
* Identifiers can't start with `r#`, so they're easy to distinguish from raw strings. (They already similarly can't start with a digit, or a sign+digit, so they're easy to distinguish from numbers.)
|
* Identifiers can't start with `r#`, so they're easy to distinguish from raw
|
||||||
* The grammar syntax itself has been described, and some confusing definitions in the grammar have been fixed accordingly (mostly related to escaped characters).
|
strings. (They already similarly can't start with a digit, or a sign+digit,
|
||||||
|
so they're easy to distinguish from numbers.)
|
||||||
|
* The grammar syntax itself has been described, and some confusing definitions
|
||||||
|
in the grammar have been fixed accordingly (mostly related to escaped
|
||||||
|
characters).
|
||||||
|
* `,`, `<`, and `>` are not legal identifier characters. They were previously
|
||||||
|
reserved for KQL but this is no longer necessary.
|
||||||
|
|
||||||
### KQL
|
### KQL
|
||||||
|
|
||||||
|
|
|
||||||
4
SPEC.md
4
SPEC.md
|
|
@ -124,7 +124,7 @@ The following characters cannot be used anywhere in a bare
|
||||||
|
|
||||||
* Any codepoint with hexadecimal value `0x20` or below.
|
* Any codepoint with hexadecimal value `0x20` or below.
|
||||||
* Any codepoint with hexadecimal value higher than `0x10FFFF`.
|
* Any codepoint with hexadecimal value higher than `0x10FFFF`.
|
||||||
* Any of `\/(){}<>;[]=,"`
|
* Any of `\/(){};[]="`
|
||||||
|
|
||||||
### Line Continuation
|
### Line Continuation
|
||||||
|
|
||||||
|
|
@ -498,7 +498,7 @@ bare-identifier := (unambiguous-ident | numberish-ident | stringish-ident) - key
|
||||||
unambiguous-ident := (identifier-char - digit - sign - "r") identifier-char*
|
unambiguous-ident := (identifier-char - digit - sign - "r") identifier-char*
|
||||||
numberish-ident := sign ((identifier-char - digit) identifier-char*)?
|
numberish-ident := sign ((identifier-char - digit) identifier-char*)?
|
||||||
stringish-ident := "r" ((identifier-char - "#") identifier-char*)?
|
stringish-ident := "r" ((identifier-char - "#") identifier-char*)?
|
||||||
identifier-char := unicode - line-space - [\\/(){}<>;\[\]=,"]
|
identifier-char := unicode - line-space - [\\/(){};\[\]="]
|
||||||
keyword := boolean | 'null'
|
keyword := boolean | 'null'
|
||||||
prop := identifier '=' value
|
prop := identifier '=' value
|
||||||
value := type? (string | number | keyword)
|
value := type? (string | number | keyword)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue