leptos_i18n_codegen 0.6.2

codegen crate for the leptos_i18n crate
Documentation
#![forbid(unsafe_code)]
#![deny(warnings)]
#![allow(clippy::too_many_arguments)]
//! # About Leptos i18n codegen
//!
//! This crate expose the codegen functions for `leptos_i18n`
//!
//! This crate must be used with `leptos_i18n` and should'nt be used outside of it.

use leptos_i18n_parser::parse_locales::{ParsedLocales, error::Result};
use proc_macro2::TokenStream;

pub mod load_locales;
pub mod utils;

pub fn gen_code(
    parsed_locales: &ParsedLocales,
    crate_path: Option<&syn::Path>,
    emit_diagnostics: bool,
    top_level_attributes: Option<&TokenStream>,
    gen_docs: bool,
) -> Result<TokenStream> {
    load_locales::load_locales(
        parsed_locales,
        crate_path,
        emit_diagnostics,
        top_level_attributes,
        gen_docs,
    )
}