Website Summary Files Commits Branches @commit @diff @stats
path: root / homework / 81498 / Project / Wizard / Tokenizing / Token.cs
blob: 1d68e8e444997138dff0ab5b7ee9bf875859eee5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Wizard
{
    public class Token
    {
        public Token(TokenType type, int line, string lexeme, string location, decimal? number)
        {
            Type = type;
            Line = line;
            Lexeme = lexeme;
            Location = location;
            Number = number;

        }

        public TokenType Type { get; private set; }
        public int Line { get; private set; }
        public string Lexeme { get; private set; }
        public decimal? Number { get; private set; }
        public string Location { get; private set; }

        public override string ToString()
        {
            return Type.ToString() + " " + Lexeme + " " + Number;
        }

    }
}