-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathPosition.cs
32 lines (31 loc) · 991 Bytes
/
Position.cs
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
/*
* Copyright (c) 2003-2017 by Alexander Gnauck, AG-Software
* All Rights Reserved.
* Contact information for AG-Software is available at http://www.ag-software.de
*
* xpnet is a deriviative of James Clark's XP parser.
* See copying.txt for more info.
*/
namespace XpNet
{
/// <summary>
/// Represents a position in an entity.
/// A position can be modified by <code>Encoding.movePosition</code>.
/// Creates a position for the start of an entity: the line number is
/// 1 and the column number is 0.
/// </summary>
public class Position
{
/// <summary>
/// Returns the line number.
/// The first line number is 1.
/// </summary>
public int LineNumber { get; set; } = 1;
/// <summary>
/// Returns the column number.
/// The first column number is 0.
/// A tab character is not treated specially.
/// </summary>
public int ColumnNumber { get; set; } = 0;
}
}