From 21f8239ac8be6093967bc91ec155782d37efcb6a Mon Sep 17 00:00:00 2001 From: Vincent Esche Date: Fri, 8 Jan 2021 15:46:48 +0100 Subject: Fixed typos in code comments --- crates/syntax/src/parsing/lexer.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/syntax/src/parsing/lexer.rs') diff --git a/crates/syntax/src/parsing/lexer.rs b/crates/syntax/src/parsing/lexer.rs index 0cbba73c5..7c8d0a4c4 100644 --- a/crates/syntax/src/parsing/lexer.rs +++ b/crates/syntax/src/parsing/lexer.rs @@ -24,7 +24,7 @@ pub struct Token { /// Beware that it checks for shebang first and its length contributes to resulting /// tokens offsets. pub fn tokenize(text: &str) -> (Vec, Vec) { - // non-empty string is a precondtion of `rustc_lexer::strip_shebang()`. + // non-empty string is a precondition of `rustc_lexer::strip_shebang()`. if text.is_empty() { return Default::default(); } @@ -76,7 +76,7 @@ pub fn lex_single_syntax_kind(text: &str) -> Option<(SyntaxKind, Option Option { @@ -96,7 +96,7 @@ pub fn lex_single_valid_syntax_kind(text: &str) -> Option { /// /// Beware that unescape errors are not checked at tokenization time. fn lex_first_token(text: &str) -> Option<(Token, Option)> { - // non-empty string is a precondtion of `rustc_lexer::first_token()`. + // non-empty string is a precondition of `rustc_lexer::first_token()`. if text.is_empty() { return None; } @@ -117,7 +117,7 @@ fn rustc_token_kind_to_syntax_kind( token_text: &str, ) -> (SyntaxKind, Option<&'static str>) { // A note on an intended tradeoff: - // We drop some useful infromation here (see patterns with double dots `..`) + // We drop some useful information here (see patterns with double dots `..`) // Storing that info in `SyntaxKind` is not possible due to its layout requirements of // being `u16` that come from `rowan::SyntaxKind`. -- cgit v1.2.3