From 8c5c8f2c199e1df8ff5f5166972c0938661cd189 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 4 Feb 2021 14:58:47 +0100 Subject: [PATCH] util:: parseint function --- util.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/util.cpp b/util.cpp index 48ab264c..0768bae8 100644 --- a/util.cpp +++ b/util.cpp @@ -443,7 +443,13 @@ cld exp_parser::parse(int prio) { EX ld parseld(const string& s) { exp_parser ep; ep.s = s; - return real(ep.parse()); + return ep.rparse(); + } + +EX int parseint(const string& s) { + exp_parser ep; + ep.s = s; + return ep.iparse(); } EX string available_functions() {