mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
ra_syntax: fixed a typo in doc comment
This commit is contained in:
parent
9e7eaa959f
commit
b1764d85fc
1 changed files with 4 additions and 2 deletions
|
@ -69,7 +69,7 @@ pub fn lex_single_syntax_kind(text: &str) -> Option<(SyntaxKind, Option<SyntaxEr
|
||||||
.map(|(token, error)| (token.kind, error))
|
.map(|(token, error)| (token.kind, error))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The same as `single_syntax_kind()` but returns only `SyntaxKind` and
|
/// The same as `lex_single_syntax_kind()` but returns only `SyntaxKind` and
|
||||||
/// returns `None` if any tokenization error occured.
|
/// returns `None` if any tokenization error occured.
|
||||||
///
|
///
|
||||||
/// Beware that unescape errors are not checked at tokenization time.
|
/// Beware that unescape errors are not checked at tokenization time.
|
||||||
|
@ -79,10 +79,12 @@ pub fn lex_single_valid_syntax_kind(text: &str) -> Option<SyntaxKind> {
|
||||||
.map(|(token, _error)| token.kind)
|
.map(|(token, _error)| token.kind)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the first encountered token at the beginning of the string.
|
/// Returns `SyntaxKind` and `Option<SyntaxError>` of the first token
|
||||||
|
/// encountered at the beginning of the string.
|
||||||
///
|
///
|
||||||
/// Returns `None` if the string contains zero tokens or if the token was parsed
|
/// Returns `None` if the string contains zero tokens or if the token was parsed
|
||||||
/// with an error.
|
/// with an error.
|
||||||
|
/// The token is malformed if the returned error is not `None`.
|
||||||
///
|
///
|
||||||
/// Beware that unescape errors are not checked at tokenization time.
|
/// Beware that unescape errors are not checked at tokenization time.
|
||||||
fn first_token(text: &str) -> Option<(Token, Option<SyntaxError>)> {
|
fn first_token(text: &str) -> Option<(Token, Option<SyntaxError>)> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue