oak-vala 0.0.11

Vala object-oriented programming language parser with support for GObject-based programming and modern syntax features.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
#![doc = include_str!("readme.md")]
use oak_core::errors::ParseResult;
use oak_highlight::{HighlightResult, Highlighter, OakHighlighter, themes::Theme};

/// Vala syntax highlighter.
pub struct ValaHighlighter;

impl Highlighter for ValaHighlighter {
    fn highlight<'a>(&self, source: &'a str, language: &str, theme: Theme) -> ParseResult<HighlightResult<'a>> {
        let highlighter = OakHighlighter::new().theme(theme);
        highlighter.highlight(source, language, theme)
    }
}