perl-token
Core token type definitions for the Perl parser ecosystem.
Overview
perl-token is a Tier 1 leaf crate that defines the shared token types used
across the lexer, tokenizer, and parser crates. It has zero external
dependencies (only std::sync::Arc).
Public API
Token-- a token withkind: TokenKind,text: Arc<str>,start: usize,end: usizeTokenKind-- enum classifying every Perl token: keywords, operators, delimiters, literals, sigils, and special tokens
Usage
use ;
let tok = new;
assert_eq!;
Workspace Role
Foundational crate consumed by perl-lexer, perl-tokenizer, perl-parser-core,
and downstream parser/LSP crates. Part of the
tree-sitter-perl-rs workspace.
License
MIT OR Apache-2.0