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.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user