From 3ec781d4f2e2e3087a99b7ace21f97a84b7c7b84 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Wed, 22 Jan 2020 02:11:38 +0200 Subject: ra_syntax: remove code duplication and token reevaluation from ast::Literal::kind() --- crates/ra_parser/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_parser/src') diff --git a/crates/ra_parser/src/lib.rs b/crates/ra_parser/src/lib.rs index 65134277e..81055746b 100644 --- a/crates/ra_parser/src/lib.rs +++ b/crates/ra_parser/src/lib.rs @@ -27,7 +27,7 @@ pub use syntax_kind::SyntaxKind; #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ParseError(pub String); -/// `TokenSource` abstracts the source of the tokens parser operates one. +/// `TokenSource` abstracts the source of the tokens parser operates on. /// /// Hopefully this will allow us to treat text and token trees in the same way! pub trait TokenSource { @@ -43,7 +43,7 @@ pub trait TokenSource { fn is_keyword(&self, kw: &str) -> bool; } -/// `TokenCursor` abstracts the cursor of `TokenSource` operates one. +/// `Token` abstracts the cursor of `TokenSource` operates on. #[derive(Debug, Copy, Clone, Eq, PartialEq)] pub struct Token { /// What is the current token? -- cgit v1.2.3