Added feature: dot operator support - #153
Conversation
|
Thank you for the pull request. I think it may make more sense to support a dot operator as an actual operator. So I would not merge this for now. |
|
I thought over this issue, if we implement a dot operator, how do you expose the interface to programmer? In object orienting world, we define a class, and a method, the compiler basically translates the method into a function: For example, how do you call method So the most simple way is let the user to implement a
|
|
I would have an usecase for this in dezoomify-rs, to solve lovasoa/dezoomify-rs#222 |
|
I think the simplest way would be to copy Rust: the expression |
|
How do you disambiguate from You already have some built-in functions, so just let user to implement a dot function I already forked the https://github.com/sweihub/evalexpr example |
|
Currently, |
|
in my case I have variables starting with '.', they are debugger symbols like '._main', please dont break that |
e4a8571 to
6608b16
Compare
Hi @ISibboI
Would you review and merge this?
Once the dot operator supported, we can do object like expressions, a quick glance:
The full test