-
Notifications
You must be signed in to change notification settings - Fork 31
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
Support capturing Expr
for use in abbreviations.
#133
Conversation
e5b0d39
to
bd6e571
Compare
bd6e571
to
a32ab11
Compare
Add a generic interface function `interpolation` that hooks into the stage after macro expansion so that interpolated values in docstrings can implement their own behaviour rather than being directly interpolated into the docstring. Pass the documented expression through to `interpolation` such that abbreviation implementations can make use of this expression for their own needs.
a32ab11
to
b2746c8
Compare
Should be good to go as an initial interface for capturing the expressions, I'll leave leveraging this feature in current abbreviation implementations that could make use of it as separate follow up PRs at some point (unless anyone else gets there before me). @mortenpi feel free to review this one if you find the time to :) |
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.
LGTM! The test got me confused for a sec, hence the comment.
Co-authored-by: Morten Piibeleht <[email protected]>
Should help handle #54, and possibly make other things easier to handle, such as #19 and other places where digging into the lowered code is a pain while dealing with the raw
Expr
would be more useful.This intercepts documented expressions during macro expansion of
Core.@doc
and makes the documentedExpr
available for capturing and usage in abbreviation objects.