Skip to content
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

if possible to invoke function to calcute the result? #5

Open
creatxrgithub opened this issue Jan 5, 2022 · 1 comment
Open

if possible to invoke function to calcute the result? #5

creatxrgithub opened this issue Jan 5, 2022 · 1 comment

Comments

@creatxrgithub
Copy link

base on the example calculator.

function doX(a,b) { return a * b }

e.g. expression is 1 x 2

i want to calculate 1 x 2 by call function doX(1,2)

thanks.

@daKuleMune
Copy link
Owner

You can write a function parser which would accept a token for (doX) and map that to an internal event of functions. Then set the ( ) tokens as part of an argument tree and through a set of parse rules allow access to the compiled tokens and pass them into the event methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants