summaryrefslogtreecommitdiffstats
path: root/Parser/tokenizer.c
diff options
context:
space:
mode:
Diffstat (limited to 'Parser/tokenizer.c')
-rw-r--r--Parser/tokenizer.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index b783e80..2397969 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -80,6 +80,8 @@ char *_PyParser_TokenNames[] = {
"LEFTSHIFTEQUAL",
"RIGHTSHIFTEQUAL",
"DOUBLESTAREQUAL",
+ "DOUBLESLASH",
+ "DOUBLESLASHEQUAL",
/* This table must match the #defines in token.h! */
"OP",
"<ERRORTOKEN>",
@@ -408,6 +410,7 @@ PyToken_TwoChars(int c1, int c2)
break;
case '/':
switch (c2) {
+ case '/': return DOUBLESLASH;
case '=': return SLASHEQUAL;
}
break;
@@ -469,6 +472,16 @@ PyToken_ThreeChars(int c1, int c2, int c3)
break;
}
break;
+ case '/':
+ switch (c2) {
+ case '/':
+ switch (c3) {
+ case '=':
+ return DOUBLESLASHEQUAL;
+ }
+ break;
+ }
+ break;
}
return OP;
}