diff options
| author | Giga Bowser <45986823+Giga-Bowser@users.noreply.github.com> | 2024-12-04 19:50:02 -0500 |
|---|---|---|
| committer | Giga Bowser <45986823+Giga-Bowser@users.noreply.github.com> | 2024-12-10 12:25:13 -0500 |
| commit | d9bb8fcab15d1c92d51218e7953913ca614e3282 (patch) | |
| tree | 5368d31232db9ffda7e2469d1deb611c95d26735 | |
| parent | 3bc26ba4aa152686f10a0cf97986e4c6b7d25def (diff) | |
| download | rust-d9bb8fcab15d1c92d51218e7953913ca614e3282.tar.gz rust-d9bb8fcab15d1c92d51218e7953913ca614e3282.zip | |
minor: Add `whitespace` constructor to `SyntaxFactory`
| -rw-r--r-- | src/tools/rust-analyzer/crates/syntax/src/ast/syntax_factory/constructors.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/rust-analyzer/crates/syntax/src/ast/syntax_factory/constructors.rs b/src/tools/rust-analyzer/crates/syntax/src/ast/syntax_factory/constructors.rs index 88e9a93cd28..640d262a3e7 100644 --- a/src/tools/rust-analyzer/crates/syntax/src/ast/syntax_factory/constructors.rs +++ b/src/tools/rust-analyzer/crates/syntax/src/ast/syntax_factory/constructors.rs @@ -403,4 +403,8 @@ impl SyntaxFactory { pub fn token(&self, kind: SyntaxKind) -> SyntaxToken { make::token(kind) } + + pub fn whitespace(&self, text: &str) -> ast::SyntaxToken { + make::tokens::whitespace(text) + } } |
