Skip to main content

phase_parse

Function phase_parse 

Source
pub fn phase_parse(
    trees: &[(PathBuf, PathBuf)],
    file_lists: &[Vec<PathBuf>],
    overlay: &HashMap<PathBuf, String>,
    errors: &mut ErrorSink,
    snapshots: &mut Vec<(PathBuf, String)>,
) -> Result<(Vec<ParsedFile>, bool, bool), ()>
Expand description

Phase 2: parse every discovered file into a ParsedFile, recording each file’s source text into snapshots and any parse errors into errors. Then inject the first-party synthetic units (the bynk/bynk.cloudflare adapters and the bynk.{list,map,string} commons) that the project consumes/uses. Returns the parsed units plus whether the bynk and bynk.cloudflare adapters were injected; signals a pipeline bail via Err(()) when parsing produced errors and yielded no units at all.