mv compiler to compiler/
This commit is contained in:
parent
db534b3ac2
commit
9e5f7d5631
1686 changed files with 941 additions and 1051 deletions
14
compiler/rustc_builtin_macros/src/log_syntax.rs
Normal file
14
compiler/rustc_builtin_macros/src/log_syntax.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
use rustc_ast::tokenstream::TokenStream;
|
||||
use rustc_ast_pretty::pprust;
|
||||
use rustc_expand::base;
|
||||
|
||||
pub fn expand_log_syntax<'cx>(
|
||||
_cx: &'cx mut base::ExtCtxt<'_>,
|
||||
sp: rustc_span::Span,
|
||||
tts: TokenStream,
|
||||
) -> Box<dyn base::MacResult + 'cx> {
|
||||
println!("{}", pprust::tts_to_string(&tts));
|
||||
|
||||
// any so that `log_syntax` can be invoked as an expression and item.
|
||||
base::DummyResult::any_valid(sp)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue