annotate Implab/Parsing/AltToken.cs @ 158:130781364799 v2

refactoring, code cleanup
author cin
date Thu, 18 Feb 2016 14:34:02 +0300
parents 97fbbf816844
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
156
97fbbf816844 Promises: SignalXXX methods merged into SignalHandler method.
cin
parents: 55
diff changeset
1 using System;
55
c0bf853aa04f Added initial JSON support
cin
parents:
diff changeset
2
c0bf853aa04f Added initial JSON support
cin
parents:
diff changeset
3 namespace Implab.Parsing {
c0bf853aa04f Added initial JSON support
cin
parents:
diff changeset
4 public class AltToken: BinaryToken {
c0bf853aa04f Added initial JSON support
cin
parents:
diff changeset
5 public AltToken(Token left, Token right)
c0bf853aa04f Added initial JSON support
cin
parents:
diff changeset
6 : base(left, right) {
c0bf853aa04f Added initial JSON support
cin
parents:
diff changeset
7 }
c0bf853aa04f Added initial JSON support
cin
parents:
diff changeset
8
c0bf853aa04f Added initial JSON support
cin
parents:
diff changeset
9 public override void Accept(IVisitor visitor) {
c0bf853aa04f Added initial JSON support
cin
parents:
diff changeset
10 Safe.ArgumentNotNull(visitor, "visitor");
c0bf853aa04f Added initial JSON support
cin
parents:
diff changeset
11 visitor.Visit(this);
c0bf853aa04f Added initial JSON support
cin
parents:
diff changeset
12 }
c0bf853aa04f Added initial JSON support
cin
parents:
diff changeset
13 public override string ToString() {
c0bf853aa04f Added initial JSON support
cin
parents:
diff changeset
14 return String.Format(Right is BinaryToken ? "{0}|({1})" : "{0}|{1}", Left, Right);
c0bf853aa04f Added initial JSON support
cin
parents:
diff changeset
15 }
c0bf853aa04f Added initial JSON support
cin
parents:
diff changeset
16 }
c0bf853aa04f Added initial JSON support
cin
parents:
diff changeset
17 }