mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-19 15:27:30 +08:00

- Use explicit type of var - Use 'new()' - Remove unnecessary usings - Sort usings - Apply formatting
20 lines
534 B
C#
20 lines
534 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using UnityEngine;
|
|
using UniverseLib.Utility;
|
|
|
|
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);
|
|
}
|
|
}
|