1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use Display;
/// Represents a position in the input source, identified by a line and column number.
///
/// Both line and column numbers are 1-based: the first character of the input is at
/// position `1:1`.
///
/// `Position` is attached to every token produced by the input source and is included in
/// [`crate::error::Error::UnexpectedToken`] to indicate where in the input a parse failure
/// occurred.
///
/// # Examples
///
/// ```
/// use yapcol::input::Position;
///
/// let pos = Position::new(1, 1);
/// assert_eq!(pos.to_string(), "1:1");
/// ```