mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
make Parse fields private
this is in preparation for the new rowan API
This commit is contained in:
parent
2e466bb365
commit
deab4caa7b
31 changed files with 109 additions and 99 deletions
|
@ -95,8 +95,8 @@ pub(crate) fn expand_to_expr(
|
|||
pub(crate) fn text_to_tokentree(text: &str) -> tt::Subtree {
|
||||
// wrap the given text to a macro call
|
||||
let wrapped = format!("wrap_macro!( {} )", text);
|
||||
let wrapped = ast::SourceFile::parse(&wrapped).tree;
|
||||
let wrapped = wrapped.syntax().descendants().find_map(ast::TokenTree::cast).unwrap();
|
||||
let wrapped = ast::SourceFile::parse(&wrapped);
|
||||
let wrapped = wrapped.tree().syntax().descendants().find_map(ast::TokenTree::cast).unwrap();
|
||||
let mut wrapped = ast_to_token_tree(wrapped).unwrap().0;
|
||||
wrapped.delimiter = tt::Delimiter::None;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue