Function run_compiler_frontend

Source
pub fn run_compiler_frontend<'a>(source: &'a str) -> Vec<Node<'a>>
Expand description

Parses the given source code and returns a normalized backend AST vector.

Examples found in repository?
examples/bad_path.rs (line 7)
5fn main() {
6    let source = include_str!("./other/bad-path.txt");
7    let parsed = subscript_compiler::frontend::pass::pp_normalize::run_compiler_frontend(source);
8    for node in parsed {
9        println!("{:#?}", node);
10    }
11}
More examples
Hide additional examples
examples/frontend.rs (line 7)
4fn main() {
5    let source = include_str!("./source/electrical-engineering.txt");
6    // let source = "\\h1{Hello world}";
7    let nodes = subscript_compiler::frontend::pass::pp_normalize::run_compiler_frontend(source);
8    // let nodes = subscript_compiler::frontend::pass::html_normalize::html_canonicalization(nodes);
9    for node in nodes {
10        println!("{}", node.to_string());
11    }
12}
examples/toc.rs (line 7)
5fn main() {
6    let source = include_str!("./other/toc.txt");
7    let nodes = subscript_compiler::frontend::pass::pp_normalize::run_compiler_frontend(source);
8    // let ast = subscript_compiler::backend::Ast::new_fragment(nodes);
9    // let toc = subscript_compiler::backend::query::query_heading_nodes(&ast);
10    // for node in toc {
11    //     let node = subscript_compiler::backend::Ast::Tag(node);
12    //     println!("{:#?}", node.to_string());
13    // }
14}