Skip to main content

parse_versioned

Function parse_versioned 

Source
pub fn parse_versioned(source: &str, version: PhpVersion) -> ParseResult
Expand description

Parse source targeting the given PHP version.

Syntax that requires a higher version than version is still parsed and included in the AST, but a diagnostics::ParseError::VersionTooLow error is also emitted so callers can report it to the user.

Returns a fully-owned ParseResult. Use parse_arena_versioned for the arena form.