Skip to main content

iso10383_macros/
lib.rs

1//! ISO 10383 Market Identifier Codes Macros.
2
3mod xml;
4
5use proc_macro::TokenStream;
6
7/// Generate the Code enum and static records data.
8///
9/// # Panics
10///
11/// - If there was an error reading the given XML file or parsing the contents.
12#[proc_macro]
13pub fn generate(input: TokenStream) -> TokenStream {
14    xml::generate(input.into())
15        .expect("Could not generate code")
16        .into()
17}