-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added feature: dot operator support #153
base: main
Are you sure you want to change the base?
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