forked from ReClassNET/ReClass.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathToken.cs
More file actions
38 lines (31 loc) · 660 Bytes
/
Copy pathToken.cs
File metadata and controls
38 lines (31 loc) · 660 Bytes
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
// Design taken from https://github.com/pieterderycke/Jace
using System.Diagnostics.Contracts;
namespace ReClassNET.AddressParser
{
internal enum TokenType
{
Offset,
ModuleOffset,
Operation,
LeftBracket,
RightBracket,
ReadPointer
}
internal class Token
{
/// <summary>The type of the token.</summary>
public TokenType TokenType { get; }
/// <summary>The value of the token.</summary>
public object Value { get; }
public Token(TokenType type, object value)
{
Contract.Requires(value != null);
TokenType = type;
Value = value;
}
public override string ToString()
{
return $"{TokenType} {Value}";
}
}
}