summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorAlbert-Jan Nijburg <albertjan@trinket.io>2017-05-31 14:00:21 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2017-05-31 14:00:21 (GMT)
commitfc354f07855a9197e71f851ad930cbf5652f9160 (patch)
tree5c7c6ad2a4de72993d916c321156572d4fa4635d /Include
parent85aba238e49abd2d5a604102981d28a50f305443 (diff)
downloadcpython-fc354f07855a9197e71f851ad930cbf5652f9160.zip
cpython-fc354f07855a9197e71f851ad930cbf5652f9160.tar.gz
cpython-fc354f07855a9197e71f851ad930cbf5652f9160.tar.bz2
bpo-25324: copy tok_name before changing it (#1608)
* add test to check if were modifying token * copy list so import tokenize doesnt have side effects on token * shorten line * add tokenize tokens to token.h to get them to show up in token * move ERRORTOKEN back to its previous location, and fix nitpick * copy comments from token.h automatically * fix whitespace and make more pythonic * change to fix comments from @haypo * update token.rst and Misc/NEWS * change wording * some more wording changes
Diffstat (limited to 'Include')
-rw-r--r--Include/token.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/Include/token.h b/Include/token.h
index 595afa0..b28830b 100644
--- a/Include/token.h
+++ b/Include/token.h
@@ -67,7 +67,11 @@ extern "C" {
#define AWAIT 54
#define ASYNC 55
#define ERRORTOKEN 56
-#define N_TOKENS 57
+/* These aren't used by the C tokenizer but are needed for tokenize.py */
+#define COMMENT 57
+#define NL 58
+#define ENCODING 59
+#define N_TOKENS 60
/* Special definitions for cooperation with parser */