hara-native 0.1.21

HAL-free native host runtime and package launcher for Hara
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use super::super::source::SourceLocation;
use crate::kernel::Span;

pub fn source_location(path: &str, base_line: usize, span: &Span) -> SourceLocation {
    SourceLocation {
        path: path.into(),
        line: base_line + span.start.line,
        column: span.start.column,
        end_line: base_line + span.end.line,
        end_column: span.end.column,
    }
}