minor: Add token constructor to SyntaxFactory

This commit is contained in:
Giga Bowser 2024-11-21 13:34:12 -05:00
parent 5eb8affdc5
commit 6406048626

View file

@ -4,7 +4,7 @@ use itertools::Itertools;
use crate::{ use crate::{
ast::{self, make, HasName, HasTypeBounds}, ast::{self, make, HasName, HasTypeBounds},
syntax_editor::SyntaxMappingBuilder, syntax_editor::SyntaxMappingBuilder,
AstNode, AstNode, SyntaxKind, SyntaxToken,
}; };
use super::SyntaxFactory; use super::SyntaxFactory;
@ -151,4 +151,8 @@ impl SyntaxFactory {
ast ast
} }
pub fn token(&self, kind: SyntaxKind) -> SyntaxToken {
make::token(kind)
}
} }