-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
First of all, great work, I really liked your approach for parsing Boolean expressions. Now to the issue...
It seems your implementation doesn't deal with operator precedence like most expression evaluators do.
For instance, if you eval this expression in JavaScript: true || false && false it yields true
However, the same expression yields false in your implementation.
Making it short, your solution treats the expression as (true || false) && false while JavaScript treat it as true || (false && false).
Here is the JavaScript reference for Operator Precedence: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Operator_Precedence
Metadata
Metadata
Assignees
Labels
No labels