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

Set parser to vanilla state #28

Open
alex94cp opened this issue Aug 12, 2015 · 3 comments · May be fixed by #272
Open

Set parser to vanilla state #28

alex94cp opened this issue Aug 12, 2015 · 3 comments · May be fixed by #272

Comments

@alex94cp
Copy link

Hi! I'd want to make use of jsep as a simple expression parser for one of my libraries. However, jsep by default includes support for all javascript operators (like === ) which I don't plan to support. Could you please add a quick way to get a vanilla parser from jsep? (something like a reset method)

@Petah
Copy link

Petah commented Aug 24, 2015

+1

@EricSmekens
Copy link
Owner

With jsep.removeBinaryOp, you could remove these operators.

Is that what you want?
If no, could you give some example/results?

@SukantGujar
Copy link

This would be great. So instead of having a full set of JS operators active by default, there could be a builder/use pattern to prep up the jsep parser from. Something like -
jsep.use(binaryOps(['||', '&&', ...]))

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

Successfully merging a pull request may close this issue.

4 participants