Skip to main content

parse_program_tree

Function parse_program_tree 

Source
pub fn parse_program_tree(src: &str) -> Result<Vec<Spanned>, ParseError>
Expand description

Parse a blue program keeping every node’s source span.

This is the parser’s real output; parse_program projects the spans away. Reach for this one whenever a position is going to be shown to a human — an editor squiggle, a line:col in a CLI error, a future debugger’s breakpoint table. Reach for parse_program only when the consumer genuinely does not care where anything was.