Move keyword checks into is_identifier (#3834)

This commit is contained in:
Charlie Marsh 2023-03-31 16:56:33 -04:00 committed by GitHub
parent 968c7df770
commit 66d72b1c7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 41 additions and 42 deletions

View file

@ -1,5 +1,5 @@
// See: https://github.com/python/cpython/blob/9d692841691590c25e6cf5b2250a594d3bf54825/Lib/keyword.py#L18
pub const KWLIST: [&str; 35] = [
pub(crate) const KWLIST: [&str; 35] = [
"False", "None", "True", "and", "as", "assert", "async", "await", "break", "class", "continue",
"def", "del", "elif", "else", "except", "finally", "for", "from", "global", "if", "import",
"in", "is", "lambda", "nonlocal", "not", "or", "pass", "raise", "return", "try", "while",