19 lines
507 B
C#
Raw Normal View History

2021-05-10 15:58:49 +10:00
using System.Collections.Generic;
using System.Linq;
2021-06-05 19:36:09 +10:00
using UnityEngine;
2021-05-10 15:58:49 +10:00
namespace UnityExplorer.CSConsole.Lexers
2021-05-10 15:58:49 +10:00
{
public abstract class Lexer
{
public virtual IEnumerable<char> Delimiters => Enumerable.Empty<char>();
protected abstract Color HighlightColor { get; }
public string ColorTag => colorTag ?? (colorTag = "<color=#" + HighlightColor.ToHex() + ">");
private string colorTag;
public abstract bool TryMatchCurrent(LexerBuilder lexer);
}
}