|
20 | 20 | "def", "del", "elif", "else", "except", "finally", |
21 | 21 | "for", "from", "global", "if", "import", |
22 | 22 | "lambda", "pass", "raise", "return", |
23 | | - "try", "while", "with", "yield", "in"]; |
| 23 | + "try", "while", "with", "yield", "in", "False", "True"]; |
24 | 24 | var commonBuiltins = ["abs", "all", "any", "bin", "bool", "bytearray", "callable", "chr", |
25 | 25 | "classmethod", "compile", "complex", "delattr", "dict", "dir", "divmod", |
26 | 26 | "enumerate", "eval", "filter", "float", "format", "frozenset", |
|
60 | 60 | if (py3) { |
61 | 61 | // since http://legacy.python.org/dev/peps/pep-0465/ @ is also an operator |
62 | 62 | var identifiers = parserConf.identifiers|| /^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/; |
63 | | - myKeywords = myKeywords.concat(["nonlocal", "False", "True", "None", "async", "await"]); |
| 63 | + myKeywords = myKeywords.concat(["nonlocal", "None", "async", "await", "match", "case"]); |
64 | 64 | myBuiltins = myBuiltins.concat(["ascii", "bytes", "exec", "print"]); |
65 | 65 | var stringPrefixes = new RegExp("^(([rbuf]|(br)|(rb)|(fr)|(rf))?('{3}|\"{3}|['\"]))", "i"); |
66 | 66 | } else { |
67 | 67 | var identifiers = parserConf.identifiers|| /^[_A-Za-z][_A-Za-z0-9]*/; |
68 | 68 | myKeywords = myKeywords.concat(["exec", "print"]); |
69 | 69 | myBuiltins = myBuiltins.concat(["apply", "basestring", "buffer", "cmp", "coerce", "execfile", |
70 | 70 | "file", "intern", "long", "raw_input", "reduce", "reload", |
71 | | - "unichr", "unicode", "xrange", "False", "True", "None"]); |
| 71 | + "unichr", "unicode", "xrange", "None"]); |
72 | 72 | var stringPrefixes = new RegExp("^(([rubf]|(ur)|(br))?('{3}|\"{3}|['\"]))", "i"); |
73 | 73 | } |
74 | 74 | var keywords = wordRegexp(myKeywords); |
|
0 commit comments