7 releases
Uses new Rust 2024
| new 0.14.0 | May 12, 2026 |
|---|---|
| 0.13.3 | May 3, 2026 |
| 0.13.0-rc1 | Apr 30, 2026 |
| 0.12.2 | Apr 8, 2026 |
| 0.12.1 | Mar 31, 2026 |
#2453 in Parser implementations
220 downloads per month
Used in 42 crates
(10 directly)
240KB
5K
SLoC
perl-ast
AST (Abstract Syntax Tree) node definitions for the Perl parser ecosystem.
Overview
perl-ast provides the typed node structures used to represent parsed Perl source code. It contains two AST modules:
ast-- The primary AST used byperl-parser. DefinesNode(kind +SourceLocation) and theNodeKindenum with 50+ variants covering declarations, expressions, control flow, regex, OO constructs, and error recovery nodes. Includes S-expression serialization viato_sexp().v2-- Re-exported from the extractedperl-ast-v2microcrate. This incremental-parsing surface is currently experimental/pre-stability; nodes carry a uniqueNodeIdand useRange(line/column) positions instead of byte offsets. AddsNodeIdGenerator,MissingKind,DiagnosticId, and lightweightErrorRefnodes.
Public API
Re-exports from lib.rs: Node, NodeKind, SourceLocation.
Workspace Role
Tier 1 leaf crate. Depended on by perl-parser-core, perl-tokenizer, perl-pragma, and perl-error.
Dependencies
perl-position-tracking-- span and position types (SourceLocation,Range,Position)perl-token-- token definitions (Token,TokenKind) used in error recovery nodes
License
MIT OR Apache-2.0
AST compatibility contract
See the AST compatibility contract for
the stability tiers and required coverage when adding or changing NodeKind
variants.
Dependencies
~1–1.9MB
~39K SLoC