rouge-syntax 0.6.0

Tree-sitter syntax highlighting, symbol tags and syntax themes for Rouge
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use thiserror::Error;
use tree_sitter::LanguageError;

#[derive(Debug, Error)]
pub enum SyntaxError {
    #[error("syntax input requires {attempted} bytes, exceeding the {limit}-byte limit")]
    InputLimit { limit: usize, attempted: usize },
    #[error("missing syntax grammar: {language}")]
    MissingGrammar { language: String },
    #[error("failed to configure the syntax parser: {0}")]
    Language(#[from] LanguageError),
    #[error("syntax parser returned no tree")]
    NoTree,
}