mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 13:33:31 +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::{
|
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)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue