SimpleML Macro
This crate is an extension of simpleml. It creates an "sml" macro to allow you to declare SML-based config within your code.
Patch Notes
3.0.0
Updating the dependency on tree_iterators_rs to version 3.2 to get new features.
2.0.0
Updating the dependency on tree_iterators_rs to version 2.0 for better performance. This is a breaking change and all consumers will need to update their code to get these performance benefits. If performance is not a problem for you, there is no reason to switch.
1.0.1
Fixes a macro panic when null values are used
Usage
In order to use this macro, add the following to your Cargo.toml. NOTE: This macro requires the nightly compiler for the proc_macro_span feature.
[]
= "2.0"
= "2.0"
= "2.0"
Once you have these dependencies in place, simply add a using for the macro, and use it in your code. As an example, let's convert the following in-line declaration of the SML data structure over to using the macro. This example comes from the README.md file of simpleml.
Before
use *;
use ;
let my_sml_values = TreeNode ;
After
use sml;
let my_sml_values = sml!;