diff options
author | Aleksey Kladov <[email protected]> | 2018-09-16 10:54:24 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-09-16 11:07:39 +0100 |
commit | b5021411a84822cb3f1e3aeffad9550dd15bdeb6 (patch) | |
tree | 9dca564f8e51b298dced01c4ce669c756dce3142 /crates/libsyntax2/src/syntax_kinds/mod.rs | |
parent | ba0bfeee12e19da40b5eabc8d0408639af10e96f (diff) |
rename all things
Diffstat (limited to 'crates/libsyntax2/src/syntax_kinds/mod.rs')
-rw-r--r-- | crates/libsyntax2/src/syntax_kinds/mod.rs | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/crates/libsyntax2/src/syntax_kinds/mod.rs b/crates/libsyntax2/src/syntax_kinds/mod.rs deleted file mode 100644 index 332cd13ac..000000000 --- a/crates/libsyntax2/src/syntax_kinds/mod.rs +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | mod generated; | ||
2 | |||
3 | use std::fmt; | ||
4 | use SyntaxKind::*; | ||
5 | |||
6 | pub use self::generated::SyntaxKind; | ||
7 | |||
8 | impl fmt::Debug for SyntaxKind { | ||
9 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | ||
10 | let name = self.info().name; | ||
11 | f.write_str(name) | ||
12 | } | ||
13 | } | ||
14 | |||
15 | pub(crate) struct SyntaxInfo { | ||
16 | pub name: &'static str, | ||
17 | } | ||
18 | |||
19 | impl SyntaxKind { | ||
20 | pub fn is_trivia(self) -> bool { | ||
21 | match self { | ||
22 | WHITESPACE | COMMENT | DOC_COMMENT => true, | ||
23 | _ => false, | ||
24 | } | ||
25 | } | ||
26 | } | ||