Skip to content

Commit 8877598

Browse files
committed
minor: Add token constructor to SyntaxFactory
1 parent 25c0a00 commit 8877598

File tree

1 file changed

+5
-1
lines changed
  • src/tools/rust-analyzer/crates/syntax/src/ast/syntax_factory

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use itertools::Itertools;
44
use crate::{
55
ast::{self, make, HasName, HasTypeBounds},
66
syntax_editor::SyntaxMappingBuilder,
7-
AstNode,
7+
AstNode, SyntaxKind, SyntaxToken,
88
};
99

1010
use super::SyntaxFactory;
@@ -151,4 +151,8 @@ impl SyntaxFactory {
151151

152152
ast
153153
}
154+
155+
pub fn token(&self, kind: SyntaxKind) -> SyntaxToken {
156+
make::token(kind)
157+
}
154158
}

0 commit comments

Comments
 (0)