rust/src/syntax_kinds.rs

15 lines
373 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
2017-12-29 11:47:54 -06:00
static INFOS: [SyntaxInfo; 2] = [
SyntaxInfo { name: "IDENT" },
SyntaxInfo { name: "WHITESPACE" },
];
2017-12-28 15:56:36 -06:00
pub(crate) fn syntax_info(kind: SyntaxKind) -> &'static SyntaxInfo {
2017-12-29 11:47:54 -06:00
&INFOS[kind.0 as usize]
2017-12-28 16:21:54 -06:00
}