> compile NEMU
221220000 张三 Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux 18:37:43 up 17:27, 1 user, load average: 0.71, 0.40, 0.28
This commit is contained in:
@ -253,12 +253,12 @@ word_t expr(char *e, bool *success) {
|
||||
for (int i = 0; i < nr_token; i ++) {
|
||||
int type = tokens[i].type;
|
||||
if (type == '-' && (i == 0 || \
|
||||
type == '(' || \
|
||||
type == '+' || \
|
||||
type == '-' || \
|
||||
type == '*' || \
|
||||
type == '/' || \
|
||||
type == TK_NEG)) {
|
||||
tokens[i-1].type == '(' || \
|
||||
tokens[i-1].type == '+' || \
|
||||
tokens[i-1].type == '-' || \
|
||||
tokens[i-1].type == '*' || \
|
||||
tokens[i-1].type == '/' || \
|
||||
tokens[i-1].type == TK_NEG)) {
|
||||
tokens[i].type = TK_NEG;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user