fluent4rs 2.3.1

Parser / codec for [Fluent FTL files](https://github.com/projectfluent/fluent/blob/master/spec/fluent.ebnf), written for [lingora](https://github.com/nigeleke/lingora) (a localization management program), and may be found to be useful outside of that context. It is not intended to replace any aspects of the [fluent-rs](https://github.com/projectfluent/fluent-rs) crate implemented by [Project Fluent](https://projectfluent.org/), and, for the majority of language translation needs, the reader is referred back to that crate.
Documentation
use thiserror::Error;

#[derive(Debug, Error)]
/// Represents errors that can occur during parsing of a Fluent Translation List (FTL) resource.
pub enum Fluent4rsError {
    /// Error raised by pom parser duing parsing of fluent file text.
    #[cfg(feature = "parser-pom")]
    #[error(transparent)]
    PomParser(#[from] pom::Error),

    /// Error raised by chumsky parser duing parsing of fluent file text.
    #[cfg(feature = "parser-chumsky")]
    #[error("{0}")]
    ChumskyParser(String),

    /// Parsing completed successully according to the fluent grammar, but Junk entries
    /// found in resultant AST. By default these are treated as an error in fluent4rs.
    /// Use `parse_with_junk` to include these AST elements in the final tree.
    #[error("Unwanted junk found in Fluent grammar: {0}")]
    UnwantedJunk(String),
}