diff options
author | Veetaha <[email protected]> | 2020-01-22 00:11:38 +0000 |
---|---|---|
committer | Veetaha <[email protected]> | 2020-01-22 11:02:21 +0000 |
commit | 3ec781d4f2e2e3087a99b7ace21f97a84b7c7b84 (patch) | |
tree | 594ad1a64392afa38b438615aec3124c36350b40 /crates/ra_parser | |
parent | b982d60a4d512602b54f79b39119bde0f7e50f87 (diff) |
ra_syntax: remove code duplication and token reevaluation from ast::Literal::kind()
Diffstat (limited to 'crates/ra_parser')
-rw-r--r-- | crates/ra_parser/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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; | |||
27 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 27 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
28 | pub struct ParseError(pub String); | 28 | pub struct ParseError(pub String); |
29 | 29 | ||
30 | /// `TokenSource` abstracts the source of the tokens parser operates one. | 30 | /// `TokenSource` abstracts the source of the tokens parser operates on. |
31 | /// | 31 | /// |
32 | /// Hopefully this will allow us to treat text and token trees in the same way! | 32 | /// Hopefully this will allow us to treat text and token trees in the same way! |
33 | pub trait TokenSource { | 33 | pub trait TokenSource { |
@@ -43,7 +43,7 @@ pub trait TokenSource { | |||
43 | fn is_keyword(&self, kw: &str) -> bool; | 43 | fn is_keyword(&self, kw: &str) -> bool; |
44 | } | 44 | } |
45 | 45 | ||
46 | /// `TokenCursor` abstracts the cursor of `TokenSource` operates one. | 46 | /// `Token` abstracts the cursor of `TokenSource` operates on. |
47 | #[derive(Debug, Copy, Clone, Eq, PartialEq)] | 47 | #[derive(Debug, Copy, Clone, Eq, PartialEq)] |
48 | pub struct Token { | 48 | pub struct Token { |
49 | /// What is the current token? | 49 | /// What is the current token? |