From 64060486269b6ff5e54606796fe66cb17189186b Mon Sep 17 00:00:00 2001 From: Giga Bowser <45986823+Giga-Bowser@users.noreply.github.com> Date: Thu, 21 Nov 2024 13:34:12 -0500 Subject: [PATCH] minor: Add `token` constructor to `SyntaxFactory` --- crates/syntax/src/ast/syntax_factory/constructors.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/syntax/src/ast/syntax_factory/constructors.rs b/crates/syntax/src/ast/syntax_factory/constructors.rs index 8b06109407..0d8fe4cd23 100644 --- a/crates/syntax/src/ast/syntax_factory/constructors.rs +++ b/crates/syntax/src/ast/syntax_factory/constructors.rs @@ -4,7 +4,7 @@ use itertools::Itertools; use crate::{ ast::{self, make, HasName, HasTypeBounds}, syntax_editor::SyntaxMappingBuilder, - AstNode, + AstNode, SyntaxKind, SyntaxToken, }; use super::SyntaxFactory; @@ -151,4 +151,8 @@ impl SyntaxFactory { ast } + + pub fn token(&self, kind: SyntaxKind) -> SyntaxToken { + make::token(kind) + } }