← Commit list

1193c68fa

Denys Vlasenko
Denys Vlasenko
2021-07-02
SUCCESS Duration: 152s

Subject

awk: when parsing length(), simplify eating of LPAREN

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

editors/awk.c+4 -3
@@ -1453,10 +1453,11 @@ static node *parse_expr(uint32_t term_tc)
| TC_BINOPX /* length <op> NUM */
| TC_COMMA /* print length, 1 */
);
- rollback_token();
- if (tc & TC_LPAREN) {
+ if (tc != TC_LPAREN)
+ rollback_token();
+ else {
/* It was a "(" token. Handle just like TC_BUILTIN */
- cn->l.n = parse_lrparen_list();
+ cn->l.n = parse_expr(TC_RPAREN);
}
break;
}