Skip to main content

construct_prefix

Function construct_prefix 

Source
pub fn construct_prefix<'arena>(
    arena: &'arena Bump,
    lexer: TypeLexer<'arena>,
) -> Result<(Type<'arena>, Position), ParseError>
Expand description

Parse the longest type prefix and return the position past the consumed bytes. Used by embedding callers that tokenise their own trailing text after the type.

ยงErrors

Returns a ParseError if the input does not begin with a valid type.