moonrockz/gleam-parser/fuel does not have a README file
test {
debug_inspect(
@fuel.Budget::from_int(100).map(b => b.units()),
content="Some(100)",
)
debug_inspect(@fuel.Budget::from_int(0), content="None")
}test {
assert_eq(@fuel.Budget(100).units(), 100)
}test {
let f = @fuel.Fuel(budget=@fuel.Budget::from_int(2).unwrap())
let inner = f.spend(@fuel.Operation("expression"))
inspect(inner.left(), content="1")
inspect(f.left(), content="2")
}test {
let limit : @fuel.NestingLimit = Limited(@fuel.Budget(500))
debug_inspect(limit.budget().map(b => b.units()), content="Some(500)")
debug_inspect(@fuel.NestingLimit::Unlimited.budget(), content="None")
}Install
Download zipParser and parsing utilities for the Gleam programming language in MoonBit