Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/rust/jsparagus-ast/src/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 751 B image not shown  

Quelle  source_location.rs   Sprache: unbekannt

 
Spracherkennung für: .rs vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
pub struct SourceLocation {
    pub start: usize,
    pub end: usize,
}

impl SourceLocation {
    pub fn new(start: usize, end: usize) -> Self {
        debug_assert!(start <= end);

        Self { start, end }
    }

    pub fn from_parts(start: SourceLocation, end: SourceLocation) -> Self {
        debug_assert!(start.start <= end.end);

        Self {
            start: start.start,
            end: end.end,
        }
    }

    pub fn set_range(&mut self, start: SourceLocation, end: SourceLocation) {
        debug_assert!(start.start <= end.end);
        self.start = start.start;
        self.end = end.end;
    }

    pub fn default() -> Self {
        Self { start: 0, end: 0 }
    }
}

[ Dauer der Verarbeitung: 0.29 Sekunden  ]