AltToken.cs
17 lines
| 528 B
| text/x-csharp
|
CSharpLexer
cin
|
r162 | using System; | ||
namespace Implab.Automaton.RegularExpressions { | ||||
cin
|
r177 | public class AltToken: BinaryToken { | ||
public AltToken(Token left, Token right) | ||||
cin
|
r162 | : base(left, right) { | ||
} | ||||
cin
|
r177 | public override void Accept(IVisitor visitor) { | ||
cin
|
r162 | Safe.ArgumentNotNull(visitor, "visitor"); | ||
visitor.Visit(this); | ||||
} | ||||
public override string ToString() { | ||||
cin
|
r177 | return String.Format(Right is BinaryToken ? "{0}|({1})" : "{0}|{1}", Left, Right); | ||
cin
|
r162 | } | ||
} | ||||
} | ||||