-
Notifications
You must be signed in to change notification settings - Fork 15
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
[FEATURE] Add custom hook support #635
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
I think that the logic will get quite complicated in the future with the current setup. But we can fix it as soon as it is a problem.
I'm curious why the pre and post hooks are not simply added in AbstractBlockExecutor::execute
?
I didn't want hooks to affect the block duration measured in
|
Closes #633.
This PR adds hook functionality to the Jayvee interpreter. Hooks are custom functions that are automatically executed before / after blocks. See the
PreBlockHook
andPostBlockHook
types for such a functions signature.Library users can add hooks with the
addHook
method:Edit: Due to the simplifications outlined in #634 (comment) this PR also closes #634.