MCPcopy Create free account
hub / github.com/LFDT-Nightstream/Starstream / parse_program

Function parse_program

starstream-compiler/src/parser/mod.rs:56–72  ·  view source on GitHub ↗
(source: &str)

Source from the content-addressed store, hash-verified

54}
55
56pub fn parse_program(source: &str) -> ParseOutput {
57 let mut state = context::State::new();
58 let (program, errors) = program()
59 .parse_with_state(source, &mut state)
60 .into_output_errors();
61
62 let errors = errors
63 .into_iter()
64 .map(error::ParseError::from_rich)
65 .collect();
66
67 ParseOutput {
68 program,
69 errors,
70 extra: state.0,
71 }
72}
73
74fn recursives<'a>() -> (
75 impl Parser<'a, &'a str, Statement, Extra<'a>> + Clone,

Callers 9

parse_moduleMethod · 0.85
formattedFunction · 0.85
compile_programFunction · 0.85
inputsFunction · 0.85
reanalyseMethod · 0.85
format_fileFunction · 0.85
compile_contractFunction · 0.85
runFunction · 0.85

Calls 4

programFunction · 0.85
into_output_errorsMethod · 0.80
mapMethod · 0.80
into_iterMethod · 0.80

Tested by 3

compile_programFunction · 0.68
inputsFunction · 0.68
compile_contractFunction · 0.68