oak-toml 0.0.11

High-performance incremental TOML parser for the oak ecosystem with flexible configuration, optimized for configuration files and data serialization.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::lexer::token_type::TomlTokenKind;
use oak_core::{ElementType, UniversalElementRole};

/// Alias for `TomlTokenKind` to conform to Oak's naming conventions for element types.
pub type TomlElementType = TomlTokenKind;

impl ElementType for TomlTokenKind {
    type Role = UniversalElementRole;

    fn role(&self) -> Self::Role {
        match self {
            Self::Eof => UniversalElementRole::None,
            _ => UniversalElementRole::Value,
        }
    }
}