oak_r/language/mod.rs
1use oak_core::{Language, LanguageCategory};
2
3/// R 语言定义
4#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
5pub struct RLanguage {}
6
7impl RLanguage {
8 pub fn new() -> Self {
9 Self {}
10 }
11}
12
13impl Language for RLanguage {
14 const NAME: &'static str = "r";
15 const CATEGORY: LanguageCategory = LanguageCategory::Programming;
16
17 type TokenType = crate::kind::RSyntaxKind;
18 type ElementType = crate::kind::RSyntaxKind;
19 type TypedRoot = ();
20}
21