I can see the light

This commit is contained in:
2025-05-02 18:18:13 -04:00
parent d7222cc7a4
commit 57c46b653e
35 changed files with 1247 additions and 1000 deletions
+2 -2
View File
@@ -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,
+1 -1
View File
@@ -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],