From 7b444cd8249c933fb24e5195d9c511156f8b22f4 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 18 Mar 2024 18:06:20 -0400 Subject: Insert semicolons where they should go --- compile.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/compile.c b/compile.c index fe7b2f6d..f7664519 100644 --- a/compile.c +++ b/compile.c @@ -221,7 +221,7 @@ CORD compile_statement(env_t *env, ast_t *ast) } } else if (expr_t->tag == VoidType || expr_t->tag == AbortType) { return CORD_asprintf( - "%r;\n" + "%r\n" "$test(NULL, NULL, NULL, %r, %ld, %ld);", compile_statement(env, test->expr), compile(env, WrapAST(test->expr, TextLiteral, .cord=test->expr->file->filename)), @@ -295,9 +295,9 @@ CORD compile_statement(env_t *env, ast_t *ast) if (lhs_t->tag != NumType) code_err(ast, "'^=' is only supported for Num types"); if (lhs_t->tag == NumType && Match(lhs_t, NumType)->bits == 32) - return CORD_all(lhs, " = powf(", lhs, ", ", rhs, ")"); + return CORD_all(lhs, " = powf(", lhs, ", ", rhs, ");"); else - return CORD_all(lhs, " = pow(", lhs, ", ", rhs, ")"); + return CORD_all(lhs, " = pow(", lhs, ", ", rhs, ");"); } case BINOP_LSHIFT: return CORD_asprintf("%r <<= %r;", lhs, rhs); case BINOP_RSHIFT: return CORD_asprintf("%r >>= %r;", lhs, rhs); @@ -325,15 +325,15 @@ CORD compile_statement(env_t *env, ast_t *ast) if (promote(env, &rhs, rhs_t, Match(lhs_t, ArrayType)->item_type)) { // arr ++= item if (update->lhs->tag == Var) - return CORD_all("Array__insert(&", lhs, ", $stack(", rhs, "), 0, ", compile_type_info(env, operand_t), ")"); + return CORD_all("Array__insert(&", lhs, ", $stack(", rhs, "), 0, ", compile_type_info(env, operand_t), ");"); else - return CORD_all(lhs, "Array__concat(", lhs, ", $Array(", rhs, "), ", compile_type_info(env, operand_t), ")"); + return CORD_all(lhs, "Array__concat(", lhs, ", $Array(", rhs, "), ", compile_type_info(env, operand_t), ");"); } else { // arr ++= [...] if (update->lhs->tag == Var) - return CORD_all("Array__insert_all(&", lhs, ", ", rhs, ", 0, ", compile_type_info(env, operand_t), ")"); + return CORD_all("Array__insert_all(&", lhs, ", ", rhs, ", 0, ", compile_type_info(env, operand_t), ");"); else - return CORD_all(lhs, "Array__concat(", lhs, ", ", rhs, ", ", compile_type_info(env, operand_t), ")"); + return CORD_all(lhs, "Array__concat(", lhs, ", ", rhs, ", ", compile_type_info(env, operand_t), ");"); } } else { code_err(ast, "'++=' is not implemented for %T types", operand_t); -- cgit v1.2.3