-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTextNode.cs
40 lines (36 loc) · 880 Bytes
/
TextNode.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
33
34
35
36
37
38
39
40
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ZXNTCount
{
public enum TextType
{
Unknown,
Whitespace,
NewLine,
LineBreak,
Label,
Comment
};
class TextNode
{
public TextType TextType;
public int LineNumber;
public int StartIndex;
public string Text;
public string Comments;
public TextNode(TextType textType, int lineNumber, int startIndex, string text)
{
TextType = textType;
LineNumber = lineNumber;
StartIndex = startIndex;
Text = text.Trim();
}
public override string ToString()
{
return String.Format("{0} {1} {2} '{3}'", TextType, LineNumber, StartIndex, Text);
}
}
}