I can see the light
This commit is contained in:
+2
-2
@@ -9,14 +9,14 @@ pub struct SrcFile {
|
||||
pub text: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct FilePos {
|
||||
pub file: FileID,
|
||||
pub line: usize,
|
||||
pub col: usize,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
|
||||
pub struct FileSpan {
|
||||
pub file: FileID,
|
||||
pub start: FilePos,
|
||||
|
||||
@@ -19,7 +19,7 @@ impl CompilerMsg {
|
||||
spans: Vec::new(),
|
||||
}
|
||||
}
|
||||
pub fn from_span(span: FileSpan, msg: String) -> Self {
|
||||
pub fn new(msg: String, span: FileSpan) -> Self {
|
||||
Self {
|
||||
msg,
|
||||
spans: vec![span],
|
||||
|
||||
Reference in New Issue
Block a user