Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
SourceSpan.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System;
4 
5 namespace SiliconStudio.Shaders.Ast
6 {
7  /// <summary>
8  /// A SourceSpan.
9  /// </summary>
10  public struct SourceSpan
11  {
12  #region Constants and Fields
13 
14  /// <summary>
15  /// Location of this span.
16  /// </summary>
18 
19  /// <summary>
20  /// Length of this span.
21  /// </summary>
22  public int Length;
23 
24  #endregion
25 
26  #region Constructors and Destructors
27 
28  /// <summary>
29  /// Initializes a new instance of the <see cref="SourceSpan"/> struct.
30  /// </summary>
31  /// <param name="location">
32  /// The location.
33  /// </param>
34  /// <param name="length">
35  /// The length.
36  /// </param>
37  public SourceSpan(SourceLocation location, int length)
38  {
39  Location = location;
40  Length = length;
41  }
42 
43  /// <inheritdoc/>
44  public override string ToString()
45  {
46  return string.Format("{0}", Location);
47  }
48 
49  #endregion
50  }
51 }
int Length
Length of this span.
Definition: SourceSpan.cs:22
SourceSpan(SourceLocation location, int length)
Initializes a new instance of the SourceSpan struct.
Definition: SourceSpan.cs:37
SourceLocation Location
Location of this span.
Definition: SourceSpan.cs:17