Skip to content

Commit d9bb8fc

Browse files
committed
minor: Add whitespace constructor to SyntaxFactory
1 parent 3bc26ba commit d9bb8fc

File tree

1 file changed

+4
-0
lines changed
  • src/tools/rust-analyzer/crates/syntax/src/ast/syntax_factory

1 file changed

+4
-0
lines changed

src/tools/rust-analyzer/crates/syntax/src/ast/syntax_factory/constructors.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,4 +403,8 @@ impl SyntaxFactory {
403403
pub fn token(&self, kind: SyntaxKind) -> SyntaxToken {
404404
make::token(kind)
405405
}
406+
407+
pub fn whitespace(&self, text: &str) -> ast::SyntaxToken {
408+
make::tokens::whitespace(text)
409+
}
406410
}

0 commit comments

Comments
 (0)