Skip to main content

prepare_source

Function prepare_source 

Source
pub fn prepare_source<'source>(
    file: &'source RelPath,
    text: &'source str,
) -> Result<PreparedSource<'source>, LoadError>
Expand description

Check the default file-token and recursion guards without starting a worker.

The returned handle binds the counts and subsequent parsing to immutable borrowed input. It performs no filesystem access or source mutation.

ยงErrors

Returns the located guard refusal, or storage-size overflow when the native token ceiling cannot be represented. Syntax is checked only when parsing.