← Commit list

e619a25a5

Denys Vlasenko
Denys Vlasenko
2023-06-26
SUCCESS Duration: 154s

Subject

shell/math: improve comments

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 →

shell/math.c+4 -2
@@ -856,9 +856,11 @@ evaluate_string(arith_state_t *math_state, const char *expr)
*/
prec = PREC(op);
if (prec != PREC_LPAREN && prec < UNARYPREC) {
- /* binary, ternary or RPAREN */
+ /* Binary, ternary or RPAREN */
if (lasttok != TOK_VALUE) {
- /* must be preceded by a num (example?) */
+ /* Must be preceded by a value.
+ * $((2 2 + * 3)) would be accepted without this.
+ */
goto syntax_err;
}
/* if op is RPAREN: