diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2017-05-18 10:37:24 +1200 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2017-05-18 11:03:07 +1200 |
| commit | a2566301e12364e227f0b72b51bb09698e1cb9dc (patch) | |
| tree | fa4d5dcdc8ee58dc843018f8ecc599a5b733596d /src/libsyntax/tokenstream.rs | |
| parent | 7b5c3d2b208f47b0750ea6c39f6f3f97cb1ca1bb (diff) | |
| download | rust-a2566301e12364e227f0b72b51bb09698e1cb9dc.tar.gz rust-a2566301e12364e227f0b72b51bb09698e1cb9dc.zip | |
Add an option to the parser to avoid parsing out of line modules
This is useful if parsing from stdin or a String and don't want to try and read in a module from another file. Instead we just leave a stub in the AST.
Diffstat (limited to 'src/libsyntax/tokenstream.rs')
| -rw-r--r-- | src/libsyntax/tokenstream.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/tokenstream.rs b/src/libsyntax/tokenstream.rs index 9c1371a31fe..339e7c0b628 100644 --- a/src/libsyntax/tokenstream.rs +++ b/src/libsyntax/tokenstream.rs @@ -109,7 +109,7 @@ impl TokenTree { path: cx.current_expansion.module.directory.clone(), ownership: cx.current_expansion.directory_ownership, }; - macro_parser::parse(cx.parse_sess(), tts, mtch, Some(directory)) + macro_parser::parse(cx.parse_sess(), tts, mtch, Some(directory), true) } /// Check if this TokenTree is equal to the other, regardless of span information. |
