Skip to content

Commit b1764d8

Browse files
author
Veetaha
committed
ra_syntax: fixed a typo in doc comment
1 parent 9e7eaa9 commit b1764d8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crates/ra_syntax/src/parsing/lexer.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ pub fn lex_single_syntax_kind(text: &str) -> Option<(SyntaxKind, Option<SyntaxEr
6969
.map(|(token, error)| (token.kind, error))
7070
}
7171

72-
/// The same as `single_syntax_kind()` but returns only `SyntaxKind` and
72+
/// The same as `lex_single_syntax_kind()` but returns only `SyntaxKind` and
7373
/// returns `None` if any tokenization error occured.
7474
///
7575
/// 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> {
7979
.map(|(token, _error)| token.kind)
8080
}
8181

82-
/// Returns the first encountered token at the beginning of the string.
82+
/// Returns `SyntaxKind` and `Option<SyntaxError>` of the first token
83+
/// encountered at the beginning of the string.
8384
///
8485
/// Returns `None` if the string contains zero tokens or if the token was parsed
8586
/// with an error.
87+
/// The token is malformed if the returned error is not `None`.
8688
///
8789
/// Beware that unescape errors are not checked at tokenization time.
8890
fn first_token(text: &str) -> Option<(Token, Option<SyntaxError>)> {

0 commit comments

Comments
 (0)