Skip to main content

parse_versioned

Function parse_versioned 

Source
pub fn parse_versioned<'arena, 'src>(
    arena: &'arena Bump,
    source: &'src str,
    version: PhpVersion,
) -> ParseResult<'arena, 'src>
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.