mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
grand module rename
This commit is contained in:
parent
93c0b7d794
commit
4cbc902fcc
15 changed files with 0 additions and 0 deletions
26
crates/ra_syntax/src/syntax_kinds.rs
Normal file
26
crates/ra_syntax/src/syntax_kinds.rs
Normal file
|
@ -0,0 +1,26 @@
|
|||
mod generated;
|
||||
|
||||
use crate::SyntaxKind::*;
|
||||
use std::fmt;
|
||||
|
||||
pub use self::generated::SyntaxKind;
|
||||
|
||||
impl fmt::Debug for SyntaxKind {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let name = self.info().name;
|
||||
f.write_str(name)
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) struct SyntaxInfo {
|
||||
pub name: &'static str,
|
||||
}
|
||||
|
||||
impl SyntaxKind {
|
||||
pub fn is_trivia(self) -> bool {
|
||||
match self {
|
||||
WHITESPACE | COMMENT => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue