Remove # from legal characters in a bare identifier

This commit is contained in:
Hannah Kolbeck 2021-09-26 16:44:22 -07:00
parent 99d9168a4a
commit de6e6e4156
4 changed files with 5 additions and 3 deletions

View File

@ -215,7 +215,7 @@ smile "😁"
"!@#$@$%Q#$%~@!40" "1.2.3" "!!!!!"=true
// The following is a legal bare identifier:
foo123~!@#$%^&*.:'|?+ "weeee"
foo123~!@$%^&*.:'|?+ "weeee"
// And you can also use unicode!
ノード お名前="☜(゚ヮ゚☜)"

View File

@ -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 higher than `0x10FFFF`.
* Any of `\/(){}<>;[]=,"`
* Any of `\/(){}<>;[]=,"#`
### Line Continuation
@ -428,7 +428,7 @@ node-terminator := single-line-comment | newline | ';' | eof
identifier := string | bare-identifier
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'
prop := identifier '=' value
value := type? (string | number | keyword)

View File

@ -0,0 +1 @@
r#node

View File

@ -0,0 +1 @@
node r#key=10