mirror of https://github.com/kdl-org/kdl.git
Remove # from legal characters in a bare identifier
This commit is contained in:
parent
99d9168a4a
commit
de6e6e4156
|
|
@ -215,7 +215,7 @@ smile "😁"
|
||||||
"!@#$@$%Q#$%~@!40" "1.2.3" "!!!!!"=true
|
"!@#$@$%Q#$%~@!40" "1.2.3" "!!!!!"=true
|
||||||
|
|
||||||
// The following is a legal bare identifier:
|
// The following is a legal bare identifier:
|
||||||
foo123~!@#$%^&*.:'|?+ "weeee"
|
foo123~!@$%^&*.:'|?+ "weeee"
|
||||||
|
|
||||||
// And you can also use unicode!
|
// And you can also use unicode!
|
||||||
ノード お名前="☜(゚ヮ゚☜)"
|
ノード お名前="☜(゚ヮ゚☜)"
|
||||||
|
|
|
||||||
4
SPEC.md
4
SPEC.md
|
|
@ -107,7 +107,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
|
||||||
|
|
||||||
|
|
@ -428,7 +428,7 @@ node-terminator := single-line-comment | newline | ';' | eof
|
||||||
|
|
||||||
identifier := string | bare-identifier
|
identifier := string | bare-identifier
|
||||||
bare-identifier := ((identifier-char - digit - sign) identifier-char* | sign ((identifier-char - digit) identifier-char*)?) - keyword
|
bare-identifier := ((identifier-char - digit - sign) identifier-char* | sign ((identifier-char - digit) identifier-char*)?) - keyword
|
||||||
identifier-char := unicode - linespace - [\/(){}<>;[]=,"]
|
identifier-char := unicode - linespace - [\/(){}<>;[]=,"#]
|
||||||
keyword := boolean | 'null'
|
keyword := boolean | 'null'
|
||||||
prop := identifier '=' value
|
prop := identifier '=' value
|
||||||
value := type? (string | number | keyword)
|
value := type? (string | number | keyword)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
r#node
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
node r#key=10
|
||||||
Loading…
Reference in New Issue