mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +00:00
minor: Add token
constructor to SyntaxFactory
This commit is contained in:
parent
5eb8affdc5
commit
6406048626
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue