Open nithinivi opened 2 years ago
It should be, in a different universe with different laws of Math 😄
6/2 * 3 = 1 Thanks for the insight :smile:
To make the context more clear - when you write/recreate the expression evaluator in this repository, consider the following test cases (in no way comprehensive) to avoid operator precedence bugs (Will be introduced if you call Term() instead of Factor() in the while loop).
https://github.com/sarath-soman/SlangCompiler/blob/master/src/test/java/com/slang/parser/ParserTest.java - testParseExpression()
https://github.com/praseedpai/CD_Learn/blob/3664a772adc74b3c2a20d32654c67b0bbee20628/Chapter07/SlangStep2/parser.h#L58
Shouldn't it be
?