-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathIResultOfT.cs
36 lines (31 loc) · 898 Bytes
/
IResultOfT.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
using System.Collections.Generic;
namespace Sprache
{
/// <summary>
/// Represents a parsing result.
/// </summary>
/// <typeparam name="T">The result type.</typeparam>
public interface IResult<out T>
{
/// <summary>
/// Gets the resulting value.
/// </summary>
T Value { get; }
/// <summary>
/// Gets a value indicating whether wether parsing was successful.
/// </summary>
bool WasSuccessful { get; }
/// <summary>
/// Gets the error message.
/// </summary>
string Message { get; }
/// <summary>
/// Gets the parser expectations in case of error.
/// </summary>
IEnumerable<string> Expectations { get; }
/// <summary>
/// Gets the remainder of the input.
/// </summary>
IInput Remainder { get; }
}
}