aboutsummaryrefslogtreecommitdiff
path: root/src/syntax_kinds.rs
blob: b9b47a2ede108fc9033cec4047699bc52fd67719 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Generated from grammar.ron
use tree::{SyntaxKind, SyntaxInfo};

pub const ERROR: SyntaxKind = SyntaxKind(0);
pub const IDENT: SyntaxKind = SyntaxKind(1);
pub const UNDERSCORE: SyntaxKind = SyntaxKind(2);
pub const WHITESPACE: SyntaxKind = SyntaxKind(3);

static INFOS: [SyntaxInfo; 4] = [
    SyntaxInfo { name: "ERROR" },
    SyntaxInfo { name: "IDENT" },
    SyntaxInfo { name: "UNDERSCORE" },
    SyntaxInfo { name: "WHITESPACE" },
];

pub(crate) fn syntax_info(kind: SyntaxKind) -> &'static SyntaxInfo {
    &INFOS[kind.0 as usize]
}