perl-lexer
Context-aware Perl lexer with mode-based tokenization for the perl-lsp workspace.
Overview
Handles Perl's inherently context-sensitive grammar by tracking lexer mode
(ExpectTerm vs ExpectOperator) to disambiguate / (division vs regex),
% (modulo vs hash sigil), heredocs, quote-like operators, and more. Provides
checkpointing for incremental parsing and budget limits to guard against
pathological input.
Usage
use ;
let mut lexer = new;
while let Some = lexer.next_token
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.