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

feat: user-defined functions #27

Merged
merged 2 commits into from
May 11, 2024

Conversation

cmars
Copy link
Contributor

@cmars cmars commented May 9, 2024

Describe your changes

This adds support for providing user-defined functions.

The parser is updated to allow any identifier to be a callable macro or function.

A new optional argument to evaluate allows registering custom functions.


I think I could follow this with support for the missing macros (exists, has, etc) as well as some of the built-in functions like matches.

Thank you!

Issue ticket number/link

I can open one if you think this needs more discussion there!

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have added tests (if possible)
  • I have updated the readme (if necessary)
  • I have updated the demo (if necessary)

This adds support for providing user-defined functions.

The parser is updated to allow any identifier to be a callable macro or
function.

A new optional argument to `evaluate` allows registering custom
functions.
@ChromeGG ChromeGG force-pushed the feat/user-defined-functions branch from 1e17cfb to f41392a Compare May 11, 2024 19:45
@ChromeGG
Copy link
Owner

Hi, thank you for your valuable contribution!

I fixed some minor formatting issues and removed one redundant (IMO) test. The rest looks fine.

Merging and releasing it! 🚀

@ChromeGG ChromeGG merged commit 3499d9d into ChromeGG:main May 11, 2024
3 checks passed
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 this pull request may close these issues.

2 participants