pub fn parse_blog_to_graph(input: &str) -> Result<BlockGraph, BlockGraphError>Expand description
Parse BLOG source text and lower it into a BlockGraph.
BLOG is an authoring format, so the returned graph may be structurally
incomplete. Call BlockGraph::validate when a complete graph is required.
§Errors
Returns a ParseError if the input is not valid BLOG syntax, references
undefined or duplicate block IDs, uses an unsupported version, or cannot be
represented as a graph.
§Examples
let graph = bloq_graph::parse_blog_to_graph(
"BLOG 1.0\n\n 0: ZXZ [0,0,0]\n",
)?;
assert_eq!(graph.block_count(), 1);