mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-16 22:27:45 +08:00
19 lines
507 B
C#
19 lines
507 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using UnityEngine;
|
|
|
|
namespace UnityExplorer.CSConsole.Lexers
|
|
{
|
|
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);
|
|
}
|
|
}
|