diff --git a/README.md b/README.md index 9326c4f..0ebeabb 100644 --- a/README.md +++ b/README.md @@ -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! ノード お名前="☜(゚ヮ゚☜)" diff --git a/SPEC.md b/SPEC.md index 816bab2..0fb8428 100644 --- a/SPEC.md +++ b/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 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) diff --git a/tests/test_cases/input/node_id_with_raw_str_prefix.kdl b/tests/test_cases/input/node_id_with_raw_str_prefix.kdl new file mode 100644 index 0000000..9563028 --- /dev/null +++ b/tests/test_cases/input/node_id_with_raw_str_prefix.kdl @@ -0,0 +1 @@ +r#node diff --git a/tests/test_cases/input/prop_key_with_raw_string_prefix.kdl b/tests/test_cases/input/prop_key_with_raw_string_prefix.kdl new file mode 100644 index 0000000..85b8cb1 --- /dev/null +++ b/tests/test_cases/input/prop_key_with_raw_string_prefix.kdl @@ -0,0 +1 @@ +node r#key=10