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

How could I subclass the lexer and parser? #61

Open
dmtvanzanten opened this issue Dec 21, 2024 · 1 comment
Open

How could I subclass the lexer and parser? #61

dmtvanzanten opened this issue Dec 21, 2024 · 1 comment

Comments

@dmtvanzanten
Copy link

I would like to add an 'AboutEqual' operator to the query such that the query field aeq number would get mapped to a query that uses func.abs(Table.field - number) < 0.1*number. How could I do this? I'm quite new to SLY, but looking at the metaclasses it uses, it seems not very trivial to subclass. Would you have any advice?

@dmtvanzanten
Copy link
Author

I proceeded with looking how this could be added to the package instead. I made a PR (#62) to demonstrate some example code on how this could be done.

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

1 participant