Struct parse_js::error::SyntaxError
source · pub struct SyntaxError<'a> {
pub source: &'a [u8],
pub position: usize,
pub typ: SyntaxErrorType,
pub actual_token: Option<TokenType>,
}
Fields§
§source: &'a [u8]
§position: usize
§typ: SyntaxErrorType
§actual_token: Option<TokenType>
Implementations§
source§impl<'a> SyntaxError<'a>
impl<'a> SyntaxError<'a>
pub fn new( typ: SyntaxErrorType, source: &'a [u8], position: usize, actual_token: Option<TokenType> ) -> SyntaxError<'a>
pub fn from_loc( loc: SourceRange<'a>, typ: SyntaxErrorType, actual_token: Option<TokenType> ) -> SyntaxError<'a>
Trait Implementations§
source§impl<'a> Clone for SyntaxError<'a>
impl<'a> Clone for SyntaxError<'a>
source§fn clone(&self) -> SyntaxError<'a>
fn clone(&self) -> SyntaxError<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for SyntaxError<'a>
impl<'a> Debug for SyntaxError<'a>
source§impl<'a> Display for SyntaxError<'a>
impl<'a> Display for SyntaxError<'a>
source§impl<'a> Error for SyntaxError<'a>
impl<'a> Error for SyntaxError<'a>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()