deimos-lang/src/vm/source_code_location.rs

17 lines
376 B
Rust

#[derive(Debug, Clone)]
pub struct SourceCodeLocation {
pub source_file_name: String,
pub line: usize,
pub col: usize,
}
impl SourceCodeLocation {
pub fn new(source_file_name: &str, line: usize, col: usize) -> Self {
SourceCodeLocation {
source_file_name: source_file_name.to_string(),
line,
col,
}
}
}