/
EvilBeaver
/
OneScript
Обзор
Документация
Войти
/
EvilBeaver
/
OneScript
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
v1.8.2
src/OneScript.Language/LexicalAnalysis/Lexem.cs
34 строки
972 B
Andrey Ovsiankin
Перенесены классы состояний лексера
04 июл 2019, 16:04
04 июл 2019, 16:04
5a39d03
Код
Авторство
О чём код?
/*---------------------------------------------------------- This Source Code Form is subject to the terms of the Mozilla Public License, v.2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ----------------------------------------------------------*/ using System; namespace OneScript.Language.LexicalAnalysis { public struct Lexem { public LexemType Type; public string Content; public Token Token; public int LineNumber; public static Lexem Empty() { return new Lexem() { Type = LexemType.NotALexem }; } public static Lexem EndOfText() { return new Lexem() { Type = LexemType.EndOfText, Token = Token.EndOfText }; } public override string ToString() { return string.Format("{0}:{1}", Enum.GetName(typeof(LexemType), this.Type), Content); } } }