comparison Implab/Automaton/RegularExpressions/AltToken.cs @ 177:a0ff6a0e9c44 ref20160224

refactoring
author cin
date Wed, 23 Mar 2016 01:42:00 +0300
parents 0526412bbb26
children
comparison
equal deleted inserted replaced
176:0c3c69fe225b 177:a0ff6a0e9c44
1 using System; 1 using System;
2 2
3 namespace Implab.Automaton.RegularExpressions { 3 namespace Implab.Automaton.RegularExpressions {
4 public class AltToken<TTag>: BinaryToken<TTag> { 4 public class AltToken: BinaryToken {
5 public AltToken(Token<TTag> left, Token<TTag> right) 5 public AltToken(Token left, Token right)
6 : base(left, right) { 6 : base(left, right) {
7 } 7 }
8 8
9 public override void Accept(IVisitor<TTag> visitor) { 9 public override void Accept(IVisitor visitor) {
10 Safe.ArgumentNotNull(visitor, "visitor"); 10 Safe.ArgumentNotNull(visitor, "visitor");
11 visitor.Visit(this); 11 visitor.Visit(this);
12 } 12 }
13 public override string ToString() { 13 public override string ToString() {
14 return String.Format(Right is BinaryToken<TTag> ? "{0}|({1})" : "{0}|{1}", Left, Right); 14 return String.Format(Right is BinaryToken ? "{0}|({1})" : "{0}|{1}", Left, Right);
15 } 15 }
16 } 16 }
17 } 17 }