1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// Copyright © 2024-2026 The µcad authors <info@microcad.xyz> // SPDX-License-Identifier: AGPL-3.0-or-later /// Line and column within a source code file #[derive(Clone, Debug, Default)] pub struct LineCol { /// Line number (0..) pub line: u32, /// Column number (1..) pub col: u32, } impl std::fmt::Display for LineCol { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { write!(f, "{}:{}", self.line + 1, self.col) } }