perl-token 0.12.1

Token definitions for Perl parser
Documentation
  • Coverage
  • 100%
    140 out of 140 items documented3 out of 5 items with examples
  • Size
  • Source code size: 119.58 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.39 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 16s Average build duration of successful builds.
  • all releases: 16s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • EffortlessMetrics/perl-lsp
    0 1 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • EffortlessSteven

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 with kind: TokenKind, text: Arc<str>, start: usize, end: usize
  • TokenKind -- enum classifying every Perl token: keywords, operators, delimiters, literals, sigils, and special tokens

Usage

use perl_token::{Token, TokenKind};

let tok = Token::new(TokenKind::Identifier, "foo", 0, 3);
assert_eq!(tok.kind, TokenKind::Identifier);

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