Matthew Crumley

Results 33 comments of Matthew Crumley

@Telokis That won't quite work, because that only comes into play after the expression is parsed. You would also need to modify the parser to recognize the & and |...

Right now there's no way to do that. I'm planning on adding support for arrays in the near future, and that would add support for this for free, so it's...

I'm considering this for a future release, but I'll need to work out the details of how it would work (including the parsing issues you brought up). I might end...

This is really cool. I'll take a look at it and try to get this merged for the next release.

I'll need to think about the best way to solve this. Right now, the evaluator doesn't have any concept of "this", and I'm not sure I want to introduce that...

@layanto You'll need to create an instance of the `Parser` class, then you'll be able to add your functions to the `functions` property. var parser = new Parser(); parser.functions.xyz =...

The support for objects is very limited at the moment, but technically there's nothing preventing you from returning one from an expression other than the TypeScript type definition. There's just...

Thanks for bring this up. The documentation should definitely mention that it's not enabled by default. I like your idea about making the error message more helpful. The one concern...

@pbarbiero is correct, the `==` operator is using javascript's `===` operator by design. `>`, ` 1'); console.log(expr.evaluate({ x: "3" })); //expected: true && actual: true expr = parser.parse('+y == 3');...

Thanks for the work you've put into this. I'll play around with it and see if I can come up with a solution to the problems. I'm not strongly opposed...