diff options
Diffstat (limited to 'src/syntax_kinds.rs')
-rw-r--r-- | src/syntax_kinds.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/syntax_kinds.rs b/src/syntax_kinds.rs new file mode 100644 index 000000000..18574b7f5 --- /dev/null +++ b/src/syntax_kinds.rs | |||
@@ -0,0 +1,16 @@ | |||
1 | use tree::{SyntaxKind, SyntaxInfo}; | ||
2 | |||
3 | pub const IDENT: SyntaxKind = SyntaxKind(1); | ||
4 | pub const WHITESPACE: SyntaxKind = SyntaxKind(2); | ||
5 | |||
6 | |||
7 | static IDENT_INFO: SyntaxInfo = SyntaxInfo { | ||
8 | name: "IDENT", | ||
9 | }; | ||
10 | |||
11 | pub(crate) fn syntax_info(kind: SyntaxKind) -> &'static SyntaxInfo { | ||
12 | match kind { | ||
13 | IDENT => &IDENT_INFO, | ||
14 | _ => unreachable!(), | ||
15 | } | ||
16 | } \ No newline at end of file | ||