Closed munderk closed 2 years ago
@munderk - you can add IN
support, but dealing with a list within parentheses (versus square brackets), makes it look like a function call to JSEP. Can you use []
syntax instead of ()
?
Otherwise, you could maybe create a custom plugin (probably on the gobble-token
event) to look for IN
and then utilize jsep's gobbleArguments
method?
@6utt3rfly Thanks for the reply. The use case is working fine in the newer version. No need to use the custom plugins.
We have requirement wherein we need to parse and validate "IN" clause expressions. e.g,
"Country IN ('Germany', 'France', 'UK')"
I add the "IN" operator using
jsep.addBinaryOp("IN")
and then I try to parse the expression and build tree.But whenever I try such expression for parsing, e.g,
jsep("Country IN ('Germany', 'France', 'UK')")
, it throws error.Can anyone please help me with parsing such expression and build tree properly?