pub struct VariableParser { /* private fields */ }Expand description
Parser for Perl debugger variable output.
This parser converts text output from the Perl debugger’s variable
inspection commands into structured PerlValue representations.
Implementations§
Source§impl VariableParser
impl VariableParser
Sourcepub fn with_max_depth(self, depth: usize) -> Self
pub fn with_max_depth(self, depth: usize) -> Self
Sets the maximum nesting depth for parsing.
Sourcepub fn parse_assignment(
&self,
line: &str,
) -> Result<(String, PerlValue), VariableParseError>
pub fn parse_assignment( &self, line: &str, ) -> Result<(String, PerlValue), VariableParseError>
Parses a variable assignment line from debugger output.
§Arguments
line- A line like “$var = value” or “@arr = (1, 2, 3)”
§Returns
A tuple of (variable name, parsed value) if successful.
§Errors
Returns a VariableParseError if the line cannot be parsed.
Sourcepub fn parse_value(
&self,
text: &str,
depth: usize,
) -> Result<PerlValue, VariableParseError>
pub fn parse_value( &self, text: &str, depth: usize, ) -> Result<PerlValue, VariableParseError>
Parses a value string from debugger output.
§Arguments
text- The value portion of debugger output
§Returns
The parsed PerlValue.
§Errors
Returns a VariableParseError if the value cannot be parsed.
Trait Implementations§
Source§impl Debug for VariableParser
impl Debug for VariableParser
Source§impl Default for VariableParser
impl Default for VariableParser
Source§fn default() -> VariableParser
fn default() -> VariableParser
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for VariableParser
impl RefUnwindSafe for VariableParser
impl Send for VariableParser
impl Sync for VariableParser
impl Unpin for VariableParser
impl UnsafeUnpin for VariableParser
impl UnwindSafe for VariableParser
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