diff options
author | Ethin Probst <harlydavidsen@gmail.com> | 2023-02-25 02:16:23 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-25 09:16:23 +0100 |
commit | e5314f348ec2ed545ad0d83954627e9ed8bad4c0 (patch) | |
tree | 43b54e3cbc554995ffb5ac80d5a89ac1c666c607 /cpp/src | |
parent | IceSSL/configuration macOS .NET 7.0 bugfix - Fix #1444 (#1449) (diff) | |
download | ice-e5314f348ec2ed545ad0d83954627e9ed8bad4c0.tar.bz2 ice-e5314f348ec2ed545ad0d83954627e9ed8bad4c0.tar.xz ice-e5314f348ec2ed545ad0d83954627e9ed8bad4c0.zip |
slice2py: add latest Python keywords from Python 3.11 language reference. (#1426)
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Slice/PythonUtil.cpp | 42 |
1 files changed, 39 insertions, 3 deletions
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp index ce4ff6dfc70..813c0def3cb 100644 --- a/cpp/src/Slice/PythonUtil.cpp +++ b/cpp/src/Slice/PythonUtil.cpp @@ -222,9 +222,45 @@ lookupKwd(const string& name) // static const string keywordList[] = { - "None", "and", "assert", "break", "class", "continue", "def", "del", "elif", "else", "except", "exec", - "finally", "for", "from", "global", "if", "import", "in", "is", "lambda", "not", "or", "pass", - "print", "raise", "return", "self", "try", "while", "yield" + "False", + "None", + "True", + "and", + "as", + "assert", + "async", + "await", + "break", + "case", + "class", + "continue", + "def", + "del", + "elif", + "else", + "except", + "exec", + "finally", + "for", + "from", + "global", + "if", + "import", + "in", + "is", + "lambda", + "match", + "nonlocal", + "not", + "or", + "pass", + "print", + "raise", + "return", + "try", + "while", + "with", + "yield" }; bool found = binary_search(&keywordList[0], &keywordList[sizeof(keywordList) / sizeof(*keywordList)], |