Browse Source

Added some comments for the token classes.

newNRvisualizers
Mike Krüger 14 years ago
parent
commit
5bef6f2ffc
  1. 6
      ICSharpCode.NRefactory.CSharp/Ast/CSharpTokenNode.cs
  2. 9
      ICSharpCode.NRefactory.CSharp/Ast/TokenRole.cs

6
ICSharpCode.NRefactory.CSharp/Ast/CSharpTokenNode.cs

@ -27,6 +27,12 @@ using System; @@ -27,6 +27,12 @@ using System;
namespace ICSharpCode.NRefactory.CSharp
{
/// <summary>
/// Represents a token in C#. Note that the type of the token is defined through the TokenRole.
/// </summary>
/// <remarks>
/// In all non null c# token nodes the Role of a CSharpToken must be a TokenRole.
/// </remarks>
public class CSharpTokenNode : AstNode, IRelocatable
{
public static new readonly CSharpTokenNode Null = new NullCSharpTokenNode ();

9
ICSharpCode.NRefactory.CSharp/Ast/TokenRole.cs

@ -2,13 +2,22 @@ using System; @@ -2,13 +2,22 @@ using System;
namespace ICSharpCode.NRefactory.CSharp
{
/// <summary>
/// A specific role only used for C# tokens
/// </summary>
public sealed class TokenRole : Role<CSharpTokenNode>
{
/// <summary>
/// Gets the token as string. Note that the token Name and Token value may differ.
/// </summary>
public string Token {
get;
private set;
}
/// <summary>
/// Gets the char length of the token.
/// </summary>
public int Length {
get;
private set;

Loading…
Cancel
Save