From d7d68310c0414d52e41f156d131db081cfbc60f3 Mon Sep 17 00:00:00 2001 From: Giga Bowser <45986823+Giga-Bowser@users.noreply.github.com> Date: Wed, 4 Dec 2024 19:50:02 -0500 Subject: [PATCH] minor: Add `whitespace` constructor to `SyntaxFactory` --- crates/syntax/src/ast/syntax_factory/constructors.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/syntax/src/ast/syntax_factory/constructors.rs b/crates/syntax/src/ast/syntax_factory/constructors.rs index 88e9a93cd2..640d262a3e 100644 --- a/crates/syntax/src/ast/syntax_factory/constructors.rs +++ b/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) + } }