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 /// <summary>
|
|
10 /// Выражение, соответсвующее одному символу.
|
|
11 /// </summary>
|
|
12 public class SymbolToken : Token {
|
|
13 int m_value;
|
|
14
|
|
15 public int Value {
|
|
16 get { return m_value; }
|
|
17 }
|
|
18
|
|
19 public SymbolToken(int value) {
|
|
20 m_value = value;
|
|
21 }
|
|
22 public override void Accept(IVisitor visitor) {
|
|
23 Safe.ArgumentNotNull(visitor, "visitor");
|
|
24
|
|
25 visitor.Visit(this);
|
|
26
|
|
27 }
|
|
28
|
|
29 public override string ToString() {
|
|
30 return Value.ToString();
|
|
31 }
|
|
32 }
|
|
33 }
|