forked from ccccourse/sp110b
-
Notifications
You must be signed in to change notification settings - Fork 0
為 c6 編譯器加上 do ... while
Uriel58 edited this page Jun 15, 2022
·
2 revisions
else if (tk == Do){
next();
a = e + 1;
stmt();
if (tk == While) next(); else { printf("%d: open while expected\n", line); exit(-1); }
if (tk == '(') next(); else { printf("%d: open paren expected\n", line); exit(-1); }
expr(Assign);
if (tk == ')') next(); else { printf("%d: close paren expected\n", line); exit(-1); }
if (tk == ';') next(); else { printf("%d: close ; expected\n", line); exit(-1); }
*++e = BNZ; *++e = (int)a;
}