mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2024-12-22 17:47:35 +08:00
Remove small logic error with SymbolLexer
This commit is contained in:
parent
aef4e11c01
commit
8f54415ae0
@ -17,8 +17,6 @@ namespace UnityExplorer.CSConsole
|
||||
|
||||
public class LexerBuilder
|
||||
{
|
||||
#region Core and initialization
|
||||
|
||||
public const char WHITESPACE = ' ';
|
||||
public readonly HashSet<char> IndentOpenChars = new() { '{', '(' };
|
||||
public readonly HashSet<char> IndentCloseChars = new() { '}', ')' };
|
||||
@ -50,8 +48,6 @@ namespace UnityExplorer.CSConsole
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>The last committed index for a match or no-match. Starts at -1 for a new parse.</summary>
|
||||
public int CommittedIndex { get; private set; }
|
||||
/// <summary>The index of the character we are currently parsing, at minimum it will be CommittedIndex + 1.</summary>
|
||||
|
@ -32,13 +32,7 @@ namespace UnityExplorer.CSConsole.Lexers
|
||||
|
||||
if (IsSymbol(lexer.Current))
|
||||
{
|
||||
do
|
||||
{
|
||||
lexer.Commit();
|
||||
lexer.PeekNext();
|
||||
}
|
||||
while (IsSymbol(lexer.Current));
|
||||
|
||||
lexer.Commit();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user