mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
Implemented 2-character operators.
This commit is contained in:
parent
2df7bcca97
commit
c64d04dedd
1 changed files with 20 additions and 11 deletions
|
|
@ -212,21 +212,30 @@ translabel(g, lb)
|
||||||
if (p)
|
if (p)
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
}
|
}
|
||||||
else {
|
else if (lb->lb_str[2] == lb->lb_str[0]) {
|
||||||
if (lb->lb_str[2] == lb->lb_str[0]) {
|
int type = (int) tok_1char(lb->lb_str[1]);
|
||||||
int type = (int) tok_1char(lb->lb_str[1]);
|
if (type != OP) {
|
||||||
if (type != OP) {
|
lb->lb_type = type;
|
||||||
lb->lb_type = type;
|
lb->lb_str = NULL;
|
||||||
lb->lb_str = NULL;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
printf("Unknown OP label %s\n",
|
|
||||||
lb->lb_str);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
printf("Can't translate STRING label %s\n",
|
printf("Unknown OP label %s\n",
|
||||||
lb->lb_str);
|
lb->lb_str);
|
||||||
}
|
}
|
||||||
|
else if (lb->lb_str[2] && lb->lb_str[3] == lb->lb_str[0]) {
|
||||||
|
int type = (int) tok_2char(lb->lb_str[1],
|
||||||
|
lb->lb_str[2]);
|
||||||
|
if (type != OP) {
|
||||||
|
lb->lb_type = type;
|
||||||
|
lb->lb_str = NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
printf("Unknown OP label %s\n",
|
||||||
|
lb->lb_str);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
printf("Can't translate STRING label %s\n",
|
||||||
|
lb->lb_str);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
printf("Can't translate label '%s'\n", labelrepr(lb));
|
printf("Can't translate label '%s'\n", labelrepr(lb));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue