Skip to main content

oak_wat/language/
mod.rs

1#![doc = include_str!("readme.md")]
2use oak_core::{Language, LanguageCategory};
3
4/// Configuration for the WebAssembly Text (WAT) language.
5#[derive(Default)]
6#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
7pub struct WatLanguage {}
8
9impl WatLanguage {
10    /// Creates a new instance of the WAT language configuration.
11    pub fn new() -> Self {
12        Self {}
13    }
14}
15
16impl Language for WatLanguage {
17    const NAME: &'static str = "wat";
18    const CATEGORY: LanguageCategory = LanguageCategory::Dsl;
19
20    type TokenType = crate::lexer::token_type::WatTokenType;
21    type ElementType = crate::parser::element_type::WatElementType;
22    type TypedRoot = crate::ast::WatRoot;
23}