diff --git a/src/protocol/inputsource.rs b/src/protocol/inputsource.rs index 46e5bc7d0f64af8d69356b6a7baf07bdcadbaec3..dda400c8befa547e4f817aa9f675d863c7835ad9 100644 --- a/src/protocol/inputsource.rs +++ b/src/protocol/inputsource.rs @@ -173,6 +173,8 @@ impl InputPosition { fn eval_error(&self, message: S) -> EvalError { EvalError { position: *self, message: message.to_string(), backtrace: Backtrace::new() } } + + pub(crate) fn col(&self) -> usize { self.column } } impl Default for InputPosition { @@ -202,11 +204,11 @@ pub enum ParseErrorType { #[derive(Debug)] pub struct ParseErrorStatement { - error_type: ParseErrorType, - position: InputPosition, - filename: String, - context: String, - message: String, + pub(crate) error_type: ParseErrorType, + pub(crate) position: InputPosition, + pub(crate) filename: String, + pub(crate) context: String, + pub(crate) message: String, } impl ParseErrorStatement { @@ -277,7 +279,7 @@ impl fmt::Display for ParseErrorStatement { #[derive(Debug)] pub struct ParseError2 { - statements: Vec + pub(crate) statements: Vec } impl fmt::Display for ParseError2 {