moonrockz/gleam-parser/config does not have a README file
test {
let c = @config.Config::default()
inspect(c.fuel.units(), content="100")
inspect(c.dialect.name, content="gleam-1.19")
}test {
let p = @config.Config::from_toml("[parser]\nfuel = 550\n")
debug_inspect(p.fuel.map(b => b.units()), content="Some(550)")
inspect(p.dialect is None, content="true")
}fn parse_with_config(text : String) -> @gleam.ParseResult raise {
let config = @gleam.Config::load()
@gleam.parse_text(text, config~)
}pub struct Environment((String) -> String?)test {
let file : @config.Partial = { dialect: None, fuel: @fuel.Budget::new(500), }
let env : @config.Partial = { dialect: None, fuel: @fuel.Budget::new(2000), }
let c = env.with_fallback(file).to_config(@config.Config::default())
inspect(c.fuel.units(), content="2000")
}Install
Download zipParser and parsing utilities for the Gleam programming language in MoonBit
Dependencies