55
|
1 using Implab;
|
|
2 using System;
|
|
3 using System.Collections.Generic;
|
|
4 using System.Linq;
|
|
5 using System.Text;
|
|
6 using System.Threading.Tasks;
|
|
7
|
|
8 namespace Implab.Parsing {
|
|
9 public class AltToken: BinaryToken {
|
|
10 public AltToken(Token left, Token right)
|
|
11 : base(left, right) {
|
|
12 }
|
|
13
|
|
14 public override void Accept(IVisitor visitor) {
|
|
15 Safe.ArgumentNotNull(visitor, "visitor");
|
|
16 visitor.Visit(this);
|
|
17 }
|
|
18 public override string ToString() {
|
|
19 return String.Format(Right is BinaryToken ? "{0}|({1})" : "{0}|{1}", Left, Right);
|
|
20 }
|
|
21 }
|
|
22 }
|