rust/src/syntax_kinds.rs

21 lines
498 B
Rust
Raw Normal View History

2017-12-28 16:21:54 -06:00
// Generated from grammar.ron
2017-12-28 15:56:36 -06:00
use tree::{SyntaxKind, SyntaxInfo};
2017-12-28 16:21:54 -06:00
pub const IDENT: SyntaxKind = SyntaxKind(0);
pub const WHITESPACE: SyntaxKind = SyntaxKind(1);
2017-12-28 15:56:36 -06:00
static IDENT_INFO: SyntaxInfo = SyntaxInfo {
2017-12-28 16:21:54 -06:00
name: "IDENT",
};
static WHITESPACE_INFO: SyntaxInfo = SyntaxInfo {
name: "WHITESPACE",
2017-12-28 15:56:36 -06:00
};
pub(crate) fn syntax_info(kind: SyntaxKind) -> &'static SyntaxInfo {
match kind {
IDENT => &IDENT_INFO,
2017-12-28 16:21:54 -06:00
WHITESPACE => &WHITESPACE_INFO,
_ => unreachable!()
2017-12-28 15:56:36 -06:00
}
2017-12-28 16:21:54 -06:00
}