diff options
| author | Piotr Czarnecki <pioczarn@gmail.com> | 2015-01-02 23:00:06 +0100 |
|---|---|---|
| committer | Piotr Czarnecki <pioczarn@gmail.com> | 2015-01-07 00:24:48 +0100 |
| commit | d85c017f92156d0d6854292c976c13c3312bba8e (patch) | |
| tree | 5c5c5e9cd47264e05afe3ad83fc6f8cdc72f14e6 /src/libsyntax/parse/mod.rs | |
| parent | 8efd9901b628d687d11a4d0ccc153553b38ada49 (diff) | |
| download | rust-d85c017f92156d0d6854292c976c13c3312bba8e.tar.gz rust-d85c017f92156d0d6854292c976c13c3312bba8e.zip | |
Cleanup and followup to PR #17830: parsing changes
Prevents breaking down `$name` tokens into separate `$` and `name`. Reports unknown macro variables. Fixes #18775 Fixes #18839 Fixes #15640
Diffstat (limited to 'src/libsyntax/parse/mod.rs')
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index b0969a573e6..403e8764730 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -297,7 +297,9 @@ 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, None, tts); - Parser::new(sess, cfg, box trdr) + let mut p = Parser::new(sess, cfg, box trdr); + p.check_unknown_macro_variable(); + p } // FIXME (Issue #16472): The `with_hygiene` mod should go away after |
