diff options
| author | bors <bors@rust-lang.org> | 2015-01-06 08:25:32 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-01-06 08:25:32 +0000 |
| commit | 340ac040f7603e169a3739c65956ed2213622be5 (patch) | |
| tree | 0502e3fcb9ceaa41d36c707e95baf0d7740fc3fd /src/libsyntax/parse/mod.rs | |
| parent | c7dd3c4d69aee1c4ad8cc220c194b176bba2ab62 (diff) | |
| parent | 4b359e3aeeaf97a190c5a7ecff8815b7b5734ece (diff) | |
| download | rust-340ac040f7603e169a3739c65956ed2213622be5.tar.gz rust-340ac040f7603e169a3739c65956ed2213622be5.zip | |
auto merge of #20610 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/libsyntax/parse/mod.rs')
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 8598571e5c3..b0969a573e6 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -24,8 +24,11 @@ use std::num::Int; use std::str; use std::iter; -pub mod lexer; +#[cfg_attr(stage0, macro_escape)] +#[cfg_attr(not(stage0), macro_use)] pub mod parser; + +pub mod lexer; pub mod token; pub mod attr; @@ -166,6 +169,8 @@ pub fn parse_stmt_from_source_str(name: String, // Note: keep in sync with `with_hygiene::parse_tts_from_source_str` // until #16472 is resolved. +// +// Warning: This parses with quote_depth > 0, which is not the default. pub fn parse_tts_from_source_str(name: String, source: String, cfg: ast::CrateConfig, @@ -291,7 +296,7 @@ pub fn filemap_to_tts(sess: &ParseSess, filemap: Rc<FileMap>) pub fn tts_to_parser<'a>(sess: &'a ParseSess, tts: Vec<ast::TokenTree>, cfg: ast::CrateConfig) -> Parser<'a> { - let trdr = lexer::new_tt_reader(&sess.span_diagnostic, None, tts); + let trdr = lexer::new_tt_reader(&sess.span_diagnostic, None, None, tts); Parser::new(sess, cfg, box trdr) } @@ -307,6 +312,8 @@ pub mod with_hygiene { // Note: keep this in sync with `super::parse_tts_from_source_str` until // #16472 is resolved. + // + // Warning: This parses with quote_depth > 0, which is not the default. pub fn parse_tts_from_source_str(name: String, source: String, cfg: ast::CrateConfig, |
