Replace the custom mod function with Kotlin's built-in mod extension.

This commit is contained in:
Edwin Jakobs
2025-02-01 13:53:29 +01:00
parent b86f3a9d02
commit 426e35ebd0
4 changed files with 9 additions and 9 deletions

View File

@@ -91,7 +91,7 @@ internal class ExpressionListener(
KeyLangParser.Tokens.MINUS -> left - right
KeyLangParser.Tokens.ASTERISK -> left * right
KeyLangParser.Tokens.DIVISION -> left / right
KeyLangParser.Tokens.PERCENTAGE -> mod(left, right)
KeyLangParser.Tokens.PERCENTAGE -> left.mod(right)
else -> error("operator '$operator' not implemented")
}
doubleStack.push(result)