rust/src/syntax_kinds.rs

16 lines
354 B
Rust
Raw Normal View History

2017-12-28 15:56:36 -06:00
use tree::{SyntaxKind, SyntaxInfo};
pub const IDENT: SyntaxKind = SyntaxKind(1);
pub const WHITESPACE: SyntaxKind = SyntaxKind(2);
static IDENT_INFO: SyntaxInfo = SyntaxInfo {
name: "IDENT",
};
pub(crate) fn syntax_info(kind: SyntaxKind) -> &'static SyntaxInfo {
match kind {
IDENT => &IDENT_INFO,
_ => unreachable!(),
}
}