From b1764d85fced5f3bc1db82063fca9369f9e1740b Mon Sep 17 00:00:00 2001 From: Veetaha Date: Tue, 28 Jan 2020 07:13:18 +0200 Subject: ra_syntax: fixed a typo in doc comment --- crates/ra_syntax/src/parsing/lexer.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'crates/ra_syntax/src/parsing/lexer.rs') diff --git a/crates/ra_syntax/src/parsing/lexer.rs b/crates/ra_syntax/src/parsing/lexer.rs index 55755be18..d1315e604 100644 --- a/crates/ra_syntax/src/parsing/lexer.rs +++ b/crates/ra_syntax/src/parsing/lexer.rs @@ -69,7 +69,7 @@ pub fn lex_single_syntax_kind(text: &str) -> Option<(SyntaxKind, Option Option { .map(|(token, _error)| token.kind) } -/// Returns the first encountered token at the beginning of the string. +/// Returns `SyntaxKind` and `Option` 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 /// with an error. +/// The token is malformed if the returned error is not `None`. /// /// Beware that unescape errors are not checked at tokenization time. fn first_token(text: &str) -> Option<(Token, Option)> { -- cgit v1.2.3