oak_python/language/
mod.rs1#![doc = include_str!("readme.md")]
2use oak_core::{Language, LanguageCategory};
3#[cfg(feature = "serde")]
4use serde::{Deserialize, Serialize};
5
6#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
9pub struct PythonLanguage {}
10
11impl PythonLanguage {
12 pub fn new() -> Self {
14 Self {}
15 }
16}
17
18impl Language for PythonLanguage {
19 const NAME: &'static str = "python";
20 const CATEGORY: LanguageCategory = LanguageCategory::Programming;
21
22 type TokenType = crate::lexer::token_type::PythonTokenType;
23 type ElementType = crate::parser::element_type::PythonElementType;
24 type TypedRoot = crate::ast::PythonRoot;
25}