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.
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
4fn main() {
5 let source = include_str!("./source/electrical-engineering.txt");
6 let nodes = subscript_compiler::frontend::pass::pp_normalize::run_compiler_frontend(source);
8 for node in nodes {
10 println!("{}", node.to_string());
11 }
12}
5fn main() {
6 let source = include_str!("./other/toc.txt");
7 let nodes = subscript_compiler::frontend::pass::pp_normalize::run_compiler_frontend(source);
8 }