proc_macro: Add API for loading external files into the SourceMap
#92565
Labels
A-proc-macros
Area: Procedural macros
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Summary
With this feature, proc macros (like
askama::Template
) could parse external files and then emit diagnostics with appropriate spans.Proposed API
Other APIs are possible, but I was thinking of something like this:
I'm not super familiar with the
proc_macro
API, so feel free to suggest better API designs.See also
See this discussion on Zulip and this discussion on GitHub for why I think this feature would be useful.
The text was updated successfully, but these errors were encountered: