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-29 15:48:47 -06:00
|
|
|
pub const ERROR: SyntaxKind = SyntaxKind(0);
|
|
|
|
pub const IDENT: SyntaxKind = SyntaxKind(1);
|
|
|
|
pub const UNDERSCORE: SyntaxKind = SyntaxKind(2);
|
|
|
|
pub const WHITESPACE: SyntaxKind = SyntaxKind(3);
|
2017-12-30 06:22:40 -06:00
|
|
|
pub const INT_NUMBER: SyntaxKind = SyntaxKind(4);
|
|
|
|
pub const FLOAT_NUMBER: SyntaxKind = SyntaxKind(5);
|
2017-12-30 07:30:37 -06:00
|
|
|
pub const SEMI: SyntaxKind = SyntaxKind(6);
|
|
|
|
pub const COMMA: SyntaxKind = SyntaxKind(7);
|
|
|
|
pub const DOT: SyntaxKind = SyntaxKind(8);
|
|
|
|
pub const DOTDOT: SyntaxKind = SyntaxKind(9);
|
|
|
|
pub const DOTDOTDOT: SyntaxKind = SyntaxKind(10);
|
|
|
|
pub const DOTDOTEQ: SyntaxKind = SyntaxKind(11);
|
|
|
|
pub const L_PAREN: SyntaxKind = SyntaxKind(12);
|
|
|
|
pub const R_PAREN: SyntaxKind = SyntaxKind(13);
|
|
|
|
pub const L_CURLY: SyntaxKind = SyntaxKind(14);
|
|
|
|
pub const R_CURLY: SyntaxKind = SyntaxKind(15);
|
|
|
|
pub const L_BRACK: SyntaxKind = SyntaxKind(16);
|
|
|
|
pub const R_BRACK: SyntaxKind = SyntaxKind(17);
|
|
|
|
pub const AT: SyntaxKind = SyntaxKind(18);
|
|
|
|
pub const POUND: SyntaxKind = SyntaxKind(19);
|
|
|
|
pub const TILDE: SyntaxKind = SyntaxKind(20);
|
|
|
|
pub const QUESTION: SyntaxKind = SyntaxKind(21);
|
|
|
|
pub const COLON: SyntaxKind = SyntaxKind(22);
|
|
|
|
pub const COLONCOLON: SyntaxKind = SyntaxKind(23);
|
|
|
|
pub const DOLLAR: SyntaxKind = SyntaxKind(24);
|
2017-12-28 15:56:36 -06:00
|
|
|
|
2017-12-30 07:30:37 -06:00
|
|
|
static INFOS: [SyntaxInfo; 25] = [
|
2017-12-29 15:48:47 -06:00
|
|
|
SyntaxInfo { name: "ERROR" },
|
2017-12-29 11:47:54 -06:00
|
|
|
SyntaxInfo { name: "IDENT" },
|
2017-12-29 15:48:47 -06:00
|
|
|
SyntaxInfo { name: "UNDERSCORE" },
|
2017-12-29 11:47:54 -06:00
|
|
|
SyntaxInfo { name: "WHITESPACE" },
|
2017-12-30 06:22:40 -06:00
|
|
|
SyntaxInfo { name: "INT_NUMBER" },
|
|
|
|
SyntaxInfo { name: "FLOAT_NUMBER" },
|
2017-12-30 07:30:37 -06:00
|
|
|
SyntaxInfo { name: "SEMI" },
|
|
|
|
SyntaxInfo { name: "COMMA" },
|
|
|
|
SyntaxInfo { name: "DOT" },
|
|
|
|
SyntaxInfo { name: "DOTDOT" },
|
|
|
|
SyntaxInfo { name: "DOTDOTDOT" },
|
|
|
|
SyntaxInfo { name: "DOTDOTEQ" },
|
|
|
|
SyntaxInfo { name: "L_PAREN" },
|
|
|
|
SyntaxInfo { name: "R_PAREN" },
|
|
|
|
SyntaxInfo { name: "L_CURLY" },
|
|
|
|
SyntaxInfo { name: "R_CURLY" },
|
|
|
|
SyntaxInfo { name: "L_BRACK" },
|
|
|
|
SyntaxInfo { name: "R_BRACK" },
|
|
|
|
SyntaxInfo { name: "AT" },
|
|
|
|
SyntaxInfo { name: "POUND" },
|
|
|
|
SyntaxInfo { name: "TILDE" },
|
|
|
|
SyntaxInfo { name: "QUESTION" },
|
|
|
|
SyntaxInfo { name: "COLON" },
|
|
|
|
SyntaxInfo { name: "COLONCOLON" },
|
|
|
|
SyntaxInfo { name: "DOLLAR" },
|
2017-12-29 11:47:54 -06:00
|
|
|
];
|
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
|
|
|
}
|