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
//! Breakpoint Validation for Perl DAP
//!
//! This crate provides AST-based breakpoint validation for the Perl Debug Adapter Protocol.
//! It validates breakpoint locations against parsed source code to ensure breakpoints are
//! set on executable lines, not on comments, blank lines, or inside heredoc content.
//!
//! # Features
//!
//! - **AST-Based Validation**: Uses the Perl parser AST to validate breakpoint locations
//! - **Line Suggestion**: Suggests the nearest valid line when a breakpoint is on an invalid location
//! - **Validation Reasons**: Provides detailed reasons for why a breakpoint was rejected or adjusted
//!
//! # Example
//!
//! ```rust,ignore
//! use perl_dap_breakpoint::{BreakpointValidator, AstBreakpointValidator};
//!
//! let source = "# comment\nmy $x = 1;\n";
//! let validator = AstBreakpointValidator::new(source)?;
//!
//! let result = validator.validate(1); // Line 1 is a comment
//! assert!(!result.verified);
//! assert_eq!(result.reason, Some(ValidationReason::CommentLine));
//! ```
pub use ;
pub use ;
/// Error type for breakpoint validation operations