Skip to main content

parse

Function parse 

Source
pub fn parse(tokens: &[Token], file: FileId) -> (Program, Vec<SyntaxError>)
Expand description

Parses a whole token stream for a single file into a Program plus every syntax error found. On the first V0002 (or an unrecoverable V0001, such as a reserved keyword where an item is expected), parsing stops and the items parsed so far are returned alongside the errors.