parse_file_tokens

func parse_file_tokens(source: String, input: TokenRange) -> ParseOutcome

Parses a pre-tokenized complete file without scanning or reconstructing text.

This is the macro-facing counterpart to parse_file_source: token ranges keep their existing source offsets and comments are already absent. The caller must ensure every token belongs to source and lies within input.span.

View Source
pub func parse_file_tokens(source: String, input: TokenRange) -> ParseOutcome {
	let parser = token_parser(source: source, input: input)
	parser.parse_items(allow_imports: true)
	parser.finish(comments: [])
}