From ba623c7a3a5b450b9b492de50efceea93df96039 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Mon, 10 Nov 2025 23:47:10 +0100 Subject: Add if and else operators --- src/op/else.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/op/else.c (limited to 'src/op/else.c') diff --git a/src/op/else.c b/src/op/else.c new file mode 100644 index 0000000..2c1c6b1 --- /dev/null +++ b/src/op/else.c @@ -0,0 +1,18 @@ +/* + * nanowasm, a tiny WebAssembly/Wasm interpreter + * Copyright (C) 2023-2025 Xavier Del Campo Romero + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + +#include +#include +#include +#include + +void nwp_op_else(struct nw_interp *const i) +{ + nwp_break(i, 0); +} -- cgit v1.2.3