aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/token.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/token.py')
-rw-r--r--Lib/token.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/Lib/token.py b/Lib/token.py
index 54d7cdccadc..f61723cc09d 100644
--- a/Lib/token.py
+++ b/Lib/token.py
@@ -66,12 +66,15 @@ SOFT_KEYWORD = 58
FSTRING_START = 59
FSTRING_MIDDLE = 60
FSTRING_END = 61
-COMMENT = 62
-NL = 63
+TSTRING_START = 62
+TSTRING_MIDDLE = 63
+TSTRING_END = 64
+COMMENT = 65
+NL = 66
# These aren't used by the C tokenizer but are needed for tokenize.py
-ERRORTOKEN = 64
-ENCODING = 65
-N_TOKENS = 66
+ERRORTOKEN = 67
+ENCODING = 68
+N_TOKENS = 69
# Special definitions for cooperation with parser
NT_OFFSET = 256
@@ -131,11 +134,11 @@ EXACT_TOKEN_TYPES = {
'~': TILDE,
}
-def ISTERMINAL(x):
+def ISTERMINAL(x: int) -> bool:
return x < NT_OFFSET
-def ISNONTERMINAL(x):
+def ISNONTERMINAL(x: int) -> bool:
return x >= NT_OFFSET
-def ISEOF(x):
+def ISEOF(x: int) -> bool:
return x == ENDMARKER