The code that I already have is for a bot that receives a mathematical expression and evaluates it. Right now I have this multiplication, division, subtraction and addition. The problem is that I want to build support for parentheses and parentheses in parentheses. For this to happen, I need to run the code that I wrote for expressions without parentheses for the expression inside the brackets. I was going to check "(" and add the expression inside it to the list until it reaches ")" , unless it reaches another "(" , in which case I would create a list inside the list. I would subtract, multiply and divide, and then the numbers that are left, I just add together.
So is it possible to call a definition / function from itself?
source share