/// A position in a text i.e. a `line` number starting from 0, a `column` number starting from 0 (in number of code points) and a global file `offset` starting from 0 (in number of bytes).
/// A position in a text i.e. a `line` number starting from 0, a `column` number starting from 0 (in number of code points) and a global file `offset` starting from 0 (in number of bytes).
#[derive(Eq, PartialEq, Debug, Clone, Copy)]
#[derive(Eq, PartialEq, Debug, Clone, Copy)]
@ -14,7 +12,7 @@ pub struct TextPosition {
/// An error in the syntax of the parsed file.
/// An error in the syntax of the parsed file.
///
///
/// It is composed of a message and a byte range in the input.
/// It is composed of a message and a byte range in the input.
#[derive(Debug)]
#[derive(Debug, thiserror::Error)]
pubstructSyntaxError{
pubstructSyntaxError{
pub(super)location: Range<TextPosition>,
pub(super)location: Range<TextPosition>,
pub(super)message: String,
pub(super)message: String,
@ -68,8 +66,6 @@ impl fmt::Display for SyntaxError {
}
}
}
}
implErrorforSyntaxError{}
implFrom<SyntaxError>forio::Error{
implFrom<SyntaxError>forio::Error{
#[inline]
#[inline]
fnfrom(error: SyntaxError)-> Self{
fnfrom(error: SyntaxError)-> Self{
@ -80,7 +76,7 @@ impl From<SyntaxError> for io::Error {
/// A parsing error.
/// A parsing error.
///
///
/// It is the union of [`SyntaxError`] and [`io::Error`].
/// It is the union of [`SyntaxError`] and [`io::Error`].