pub struct PragmaTracker;Expand description
Pragma state tracking for use strict, use warnings, etc.
Tracks pragma state throughout a Perl file
Implementations§
Source§impl PragmaTracker
impl PragmaTracker
Sourcepub fn build(ast: &Node) -> Vec<(Range<usize>, PragmaState)>
pub fn build(ast: &Node) -> Vec<(Range<usize>, PragmaState)>
Build a range-indexed pragma map from an AST
Sourcepub fn state_for_offset(
pragma_map: &[(Range<usize>, PragmaState)],
offset: usize,
) -> PragmaState
pub fn state_for_offset( pragma_map: &[(Range<usize>, PragmaState)], offset: usize, ) -> PragmaState
Get the pragma state at a specific byte offset
Auto Trait Implementations§
impl Freeze for PragmaTracker
impl RefUnwindSafe for PragmaTracker
impl Send for PragmaTracker
impl Sync for PragmaTracker
impl Unpin for PragmaTracker
impl UnsafeUnpin for PragmaTracker
impl UnwindSafe for PragmaTracker
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more