Enum erg_common::error::Location
source · pub enum Location {
Range {
ln_begin: usize,
col_begin: usize,
ln_end: usize,
col_end: usize,
},
LineRange(usize, usize),
Line(usize),
Unknown,
}
Expand description
Points the location (of an error) in a code. The beginning and end of each row and column where the error occurred. Basically, the beginning and end of each row and column where the error occurred is kept.
Variants§
Range
Location used for basic errors
// erg
a = 1
a = 2
// Value assigned to the structure
Location::Range {
ln_begin: 2,
col_begin: 0,
ln_end: 2,
col_end: 1,
}
LineRange(usize, usize)
Used for loss of location information when desugared. If there are guaranteed to be multiple rows
Line(usize)
Used when Location information is lost when desugared If it is guaranteed to be a single line
Unknown
Used by default in case of loss of Location information