mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-01-03 16:13:25 +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
|
public class LexerBuilder
|
||||||
{
|
{
|
||||||
#region Core and initialization
|
|
||||||
|
|
||||||
public const char WHITESPACE = ' ';
|
public const char WHITESPACE = ' ';
|
||||||
public readonly HashSet<char> IndentOpenChars = new() { '{', '(' };
|
public readonly HashSet<char> IndentOpenChars = new() { '{', '(' };
|
||||||
public readonly HashSet<char> IndentCloseChars = 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>
|
/// <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; }
|
public int CommittedIndex { get; private set; }
|
||||||
/// <summary>The index of the character we are currently parsing, at minimum it will be CommittedIndex + 1.</summary>
|
/// <summary>The index of the character we are currently parsing, at minimum it will be CommittedIndex + 1.</summary>
|
||||||
|
@ -31,14 +31,8 @@ namespace UnityExplorer.CSConsole.Lexers
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (IsSymbol(lexer.Current))
|
if (IsSymbol(lexer.Current))
|
||||||
{
|
|
||||||
do
|
|
||||||
{
|
{
|
||||||
lexer.Commit();
|
lexer.Commit();
|
||||||
lexer.PeekNext();
|
|
||||||
}
|
|
||||||
while (IsSymbol(lexer.Current));
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user