atproto_mlf
Parse mlf (Matt’s Lexicon Format, https://mlf.lol) source into the
atproto_lexicon/ast.LexiconDoc shape, so that
parse(source, id) |> result.map(encoding.encode) yields canonical
lexicon JSON. The NSID id is supplied by the caller (upstream mlf
derives it from the file path).
Values
pub fn main() -> Nil
gleam run -m atproto_mlf -- <src-dir> <out-dir> [--to json|mlf]:
convert a directory tree of .mlf and .json lexicon files into
lexicon JSON or mlf source. See atproto_mlf/cli.
pub fn parse(
source: String,
id: String,
) -> Result(ast.LexiconDoc, error.ParseError)