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

Listenable trait is not fully implemented for labeled contexts #61

Open
yuriry opened this issue Oct 20, 2022 · 2 comments · May be fixed by #65
Open

Listenable trait is not fully implemented for labeled contexts #61

yuriry opened this issue Oct 20, 2022 · 2 comments · May be fixed by #65

Comments

@yuriry
Copy link

yuriry commented Oct 20, 2022

exit() method from Listenable trait is not implemented for labeled contexts. As a result, fn exit_or(&mut self, _ctx: &OrContext<'a>) not being called when walking the generated tree :(

boolExpr:
  ...
  | boolExpr '||'  boolExpr                                  #or
  ...

Screenshot from 2022-10-19 20-06-24

See also impl<'input, 'a> Listenable<dyn LabelsListener<'input> + 'a> for AddContext<'input>

@rrevenantt
Copy link
Owner

It appears to be harder to fix than it looks. For now as a workaround you can enable visitor generation(-visitor argument), it seems to also generate correct Listenable implementation with it.

@yuriry
Copy link
Author

yuriry commented Oct 22, 2022

Thank you so much! -visitor argument fixes the problem and exit_or is now being called.

@rrevenantt rrevenantt linked a pull request Oct 23, 2022 that will close this issue
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.

2 participants