Parses a condition string and returns an object containing a numeric value and its corresponding
token expression derived from predefined token mappings.
The condition string should have the format {value/x} {expression} {x/value}, where
value should to be number value, and expression like token: ">" | ">=" | "<" | "<=" | "=".
It supports conditions where 'x' denotes the variable and the expression determines
the comparison to either side.
If x is at the left of the expression, the l_token mapping is used; if on the right,
the r_token mapping applies.
Parses a condition string and returns an object containing a numeric value and its corresponding token expression derived from predefined token mappings.
The condition string should have the format
{value/x} {expression} {x/value}
, wherevalue
should to be number value, and expression like token: ">" | ">=" | "<" | "<=" | "=". It supports conditions where 'x' denotes the variable and theexpression
determines the comparison to either side.If
x
is at the left of the expression, thel_token
mapping is used; if on the right, ther_token
mapping applies.Example
Throws
Thrown when the condition string does not match the required format.