From 9c5a06117ac92cd67cb1f3872cd2b935a2c8a4e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Sun, 10 Dec 2023 15:48:29 -0800 Subject: [PATCH] allow ,<> as identifier characters since they no longer need to be reserved --- CHANGELOG.md | 10 ++++++++-- SPEC.md | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e75f51..b6df113 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,14 @@ * Single line comments (`//`) can now be immediately followed by a newline. * All literal whitespace following a `\` in a string is now discarded. * 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.) -* The grammar syntax itself has been described, and some confusing definitions in the grammar have been fixed accordingly (mostly related to escaped characters). +* 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.) +* 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 diff --git a/SPEC.md b/SPEC.md index 3b5a782..6c39979 100644 --- a/SPEC.md +++ b/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 higher than `0x10FFFF`. -* Any of `\/(){}<>;[]=,"` +* Any of `\/(){};[]="` ### Line Continuation @@ -498,7 +498,7 @@ bare-identifier := (unambiguous-ident | numberish-ident | stringish-ident) - key unambiguous-ident := (identifier-char - digit - sign - "r") identifier-char* numberish-ident := sign ((identifier-char - digit) identifier-char*)? stringish-ident := "r" ((identifier-char - "#") identifier-char*)? -identifier-char := unicode - line-space - [\\/(){}<>;\[\]=,"] +identifier-char := unicode - line-space - [\\/(){};\[\]="] keyword := boolean | 'null' prop := identifier '=' value value := type? (string | number | keyword)