1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! PIR v0: a source-anchored tooling intermediate representation.
//!
//! PIR is lowered from [`HirFile`](crate::hir::HirFile). It models data access,
//! calls, and control flow for editor tooling and static analysis without
//! executing Perl. PIR v0 is a compiler-substrate data layer only: it does not
//! replace HIR, does not promote provider behavior, does not claim determinism,
//! and does not run real Perl.
//!
//! See [`PLSP-SPEC-0025`](../../../../docs/specs/PLSP-SPEC-0025-pir-v0.md) for
//! the authoritative contract.
//!
//! # Quick start
//!
//! ```rust
//! use perl_parser_core::Parser;
//! use perl_parser_core::hir::lower_ast;
//! use perl_parser_core::pir::lower_hir;
//!
//! let mut parser = Parser::new("my $x = foo();");
//! let output = parser.parse_with_recovery();
//! let hir = lower_ast(&output.ast);
//! let pir = lower_hir(&hir);
//!
//! // Every source-derived node preserves a source anchor.
//! assert!(pir.nodes.iter().all(|n| n.source_anchor.is_anchored()));
//! // Provider behavior never changes from lowering alone.
//! assert!(!pir.receipt.provider_behavior_changed);
//! ```
pub use ;
pub use ;
pub use ;