Closed jonathanstanley closed 1 year ago
Ah, I updated readme in github after publishing to npm. Take github as the latest doc. As for async - it depends on what kind of async you want.
a + await b(3)
, for that you'd need to define unary async
operator.a + b(3)
, but they would be async under the hood. For that you'd need to define operator('+', async (a,b) => await a + await b )
. (I need to check if that'd work - worst case you'd need to write own evaluator of AST, which is not very difficult, example is here)thanks!
nice work!
I was wondering if there is an approach that would handle async?
also, it isn't clear why github repo uses
createFn
and npm usesscript
in the first example