mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Better readability
This commit is contained in:
parent
e0f02d233f
commit
d4332760d8
3 changed files with 145 additions and 2 deletions
|
@ -5,6 +5,7 @@ use crate::{
|
|||
SyntaxKind::{self, *},
|
||||
SyntaxToken,
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct Whitespace {
|
||||
pub(crate) syntax: SyntaxToken,
|
||||
|
@ -25,6 +26,7 @@ impl AstToken for Whitespace {
|
|||
}
|
||||
fn syntax(&self) -> &SyntaxToken { &self.syntax }
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct Comment {
|
||||
pub(crate) syntax: SyntaxToken,
|
||||
|
@ -45,6 +47,7 @@ impl AstToken for Comment {
|
|||
}
|
||||
fn syntax(&self) -> &SyntaxToken { &self.syntax }
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct String {
|
||||
pub(crate) syntax: SyntaxToken,
|
||||
|
@ -65,6 +68,7 @@ impl AstToken for String {
|
|||
}
|
||||
fn syntax(&self) -> &SyntaxToken { &self.syntax }
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct RawString {
|
||||
pub(crate) syntax: SyntaxToken,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue