fn is_reserved_word(name: &str) -> bool {
    match name {
        // Reserved words in the ECMAScript standard
        "break" | "do" | "in" | "typeof" | "case" | "else" | "instanceof" | "var" | "catch"
        | "export" | "new" | "void" | "class" | "extends" | "return" | "while" | "const"
        | "finally" | "super" | "with" | "continue" | "for" | "switch" | "yield" | "debugger"
        | "function" | "this" | "default" | "if" | "throw" | "delete" | "import" | "try"
        | "enum" | "await" | "implements" | "package" | "protected" | "interface" | "private"
        | "public" | "null" | "true" | "false" | "let" => true,

        // Internal names, reserved to avoid conflicts
        _ => name.starts_with("__percival"),
    }
}
/// Checks if a token is reserved, which cannot be used as an identifier.
///
/// See [https://262.ecma-international.org/6.0/#sec-reserved-words] for
/// JavaScript reserved words. The rest of the tokens listed here are prohibited
/// for internal reasons, or because they mean other things in the context of
/// the Percival language.
Checks if a token is reserved, which cannot be used as an identifier.
Checks if a token is reserved which cannot be used as an identifier .
fn is_reserved_word(name: &str) -> bool {
    match name {
        // Reserved words in the ECMAScript standard
        "break" | "do" | "in" | "typeof" | "case" | "else" | "instanceof" | "var" | "catch"
        | "export" | "new" | "void" | "class" | "extends" | "return" | "while" | "const"
        | "finally" | "super" | "with" | "continue" | "for" | "switch" | "yield" | "debugger"
        | "function" | "this" | "default" | "if" | "throw" | "delete" | "import" | "try"
        | "enum" | "await" | "implements" | "package" | "protected" | "interface" | "private"
        | "public" | "null" | "true" | "false" | "let" => true,
        // Internal names, reserved to avoid conflicts
        _ => name.starts_with("__percival"),
    }
}
fn is_reserved_word ( name : & str ) -> bool { match name { // Reserved words in the ECMAScript standard " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " | " " => true , // Internal names, reserved to avoid conflicts _ => name . starts_with ( " " ) , } }
Checks if a token is reserved, which cannot be used as an identifier.
Checks if a token is reserved which cannot be used as an identifier .
name
&str
name
&str