Commit c64d04de authored by Guido van Rossum's avatar Guido van Rossum

Implemented 2-character operators.

parent 2df7bcca
......@@ -212,8 +212,7 @@ translabel(g, lb)
if (p)
*p = '\0';
}
else {
if (lb->lb_str[2] == lb->lb_str[0]) {
else if (lb->lb_str[2] == lb->lb_str[0]) {
int type = (int) tok_1char(lb->lb_str[1]);
if (type != OP) {
lb->lb_type = type;
......@@ -223,10 +222,20 @@ translabel(g, lb)
printf("Unknown OP label %s\n",
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("Can't translate STRING label %s\n",
printf("Unknown OP label %s\n",
lb->lb_str);
}
else
printf("Can't translate STRING label %s\n",
lb->lb_str);
}
else
printf("Can't translate label '%s'\n", labelrepr(lb));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment