remove old parsing methods
This commit is contained in:
@@ -76,7 +76,7 @@ impl<N: AstNode> From<AstPtr<N>> for SyntaxNodePtr {
|
||||
fn test_local_syntax_ptr() {
|
||||
use crate::{ast, AstNode, SourceFile};
|
||||
|
||||
let file = SourceFile::parse("struct Foo { f: u32, }");
|
||||
let file = SourceFile::parse("struct Foo { f: u32, }").ok().unwrap();
|
||||
let field = file.syntax().descendants().find_map(ast::NamedFieldDef::cast).unwrap();
|
||||
let ptr = SyntaxNodePtr::new(field.syntax());
|
||||
let field_syntax = ptr.to_node(file.syntax());
|
||||
|
||||
Reference in New Issue
Block a user