parse_z80_with_context_builder

Function parse_z80_with_context_builder 

Source
pub fn parse_z80_with_context_builder<S: Into<String>>(
    str: S,
    builder: ParserContextBuilder,
) -> Result<LocatedListing, AssemblerError>
Expand description

Produce the stream of tokens. In case of error, return an explanatory string. In case of success loop over all the tokens in order to expand those that read files

Examples found in repository?
examples/generate_loop4000.rs (line 7)
5fn build_sna(code: &str) -> Snapshot {
6    let listing =
7        parse_z80_with_context_builder(code, Default::default()).expect("Unable to parse z80 code");
8    let (_, env) = visit_tokens_all_passes_with_options(&listing, Default::default())
9        .expect("Unable to assemble z80 code");
10    let sna = env.sna().clone();
11
12    sna
13}