pub fn parse<S: AsRef<str>>(
source: S,
pindex: &PackageIndex,
options: &ParserOptions,
) -> Result<Program, Error>Expand description
Parses the given reader to a BraneScript / Bakery Program.
§Generic arguments
S: The &str-like type of thesourcetext.
§Arguments
source: The source text to parse from.pindex: The PackageIndex that we use to resolve patterns.options: Some auxillary ParserOptions that finetune its behaviour.
§Returns
A new Program that is the parsed source code. It still needs to be compiled to a workflow using brane-ast.
§Errors
This function may error if we could not read the reader or if the source code was somehow malformed.