Closed astrolemonade closed 9 months ago
This is how it will look.
I looked again and I think you wanted to avoid checking the operands types again.
if (!IS_NUMBER(peek(0)) || !IS_NUMBER(peek(1))) {
runtimeError("Operands must be numbers.");
return INTERPRET_RUNTIME_ERROR;
}
Hey! I noticed that in https://craftinginterpreters.com/strings.html#struct-inheritance the
BINARY_OP(NUMBER_VAL, +);
is expanded for numbers but it doesn't add anything different than the old version.