]> git.lizzy.rs Git - rust.git/blob - src/libsyntax_expand/lib.rs
Rollup merge of #65544 - dorfsmay:doc_keyword_break, r=Dylan-DPC
[rust.git] / src / libsyntax_expand / lib.rs
1 #![feature(crate_visibility_modifier)]
2 #![feature(decl_macro)]
3 #![feature(proc_macro_diagnostic)]
4 #![feature(proc_macro_internals)]
5 #![feature(proc_macro_span)]
6
7 extern crate proc_macro as pm;
8
9 // A variant of 'try!' that panics on an Err. This is used as a crutch on the
10 // way towards a non-panic!-prone parser. It should be used for fatal parsing
11 // errors; eventually we plan to convert all code using panictry to just use
12 // normal try.
13 #[macro_export]
14 macro_rules! panictry {
15     ($e:expr) => ({
16         use std::result::Result::{Ok, Err};
17         use errors::FatalError;
18         match $e {
19             Ok(e) => e,
20             Err(mut e) => {
21                 e.emit();
22                 FatalError.raise()
23             }
24         }
25     })
26 }
27
28 mod placeholders;
29 mod proc_macro_server;
30
31 pub use syntax_pos::hygiene;
32 pub use mbe::macro_rules::compile_declarative_macro;
33 pub mod allocator;
34 pub mod base;
35 pub mod build;
36 pub mod expand;
37 pub mod proc_macro;
38
39 crate mod mbe;