aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src
diff options
context:
space:
mode:
authorVeetaha <[email protected]>2020-01-22 00:11:38 +0000
committerVeetaha <[email protected]>2020-01-22 11:02:21 +0000
commit3ec781d4f2e2e3087a99b7ace21f97a84b7c7b84 (patch)
tree594ad1a64392afa38b438615aec3124c36350b40 /crates/ra_parser/src
parentb982d60a4d512602b54f79b39119bde0f7e50f87 (diff)
ra_syntax: remove code duplication and token reevaluation from ast::Literal::kind()
Diffstat (limited to 'crates/ra_parser/src')
-rw-r--r--crates/ra_parser/src/lib.rs4
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)]
28pub struct ParseError(pub String); 28pub 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!
33pub trait TokenSource { 33pub 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)]
48pub struct Token { 48pub struct Token {
49 /// What is the current token? 49 /// What is the current token?