From 68f48f6e63337d9c4abd29d516398781e9747534 Mon Sep 17 00:00:00 2001 From: Lai-YT <381xvmvbib@gmail.com> Date: Fri, 15 Sep 2023 14:15:21 +0800 Subject: [PATCH] Generate code of modulo expression --- src/ast.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ast.cpp b/src/ast.cpp index a3b55be5..c6c159a8 100644 --- a/src/ast.cpp +++ b/src/ast.cpp @@ -280,7 +280,9 @@ std::string DivExprNode::Op_() const { return "/"; } -std::string ModExprNode::OpName_() const {} +std::string ModExprNode::OpName_() const { + return "rem"; +} std::string ModExprNode::Op_() const { return "%";