daily update on 20250214 by nitload youmu, building syntax analysor, tough!

This commit is contained in:
Nitload
2025-02-14 13:30:17 +08:00
parent c23b640cae
commit ccef0de6f6
68 changed files with 2594 additions and 913 deletions
@@ -75,7 +75,7 @@ namespace StgSharp.Script
public bool IsEmpty => _isWriting ?
(_cache.Count == 0) :
(_buffer.Length == 0) || (_index >= _buffer.Length - 1);
(_buffer.Length == 0) || (_index >= _buffer.Length);
public int Location => _begin + _index;
@@ -87,6 +87,10 @@ namespace StgSharp.Script
{
throw new InvalidOperationException("Cannot read before all writing operation.");
}
if (_index >= _buffer.Length)
{
return string.Empty;
}
var str = _buffer[_index];
_index++;
return str;
@@ -98,6 +102,11 @@ namespace StgSharp.Script
{
throw new InvalidOperationException("Cannot read before all writing operation.");
}
if (_index >= _buffer.Length)
{
position = -1;
return string.Empty;
}
position = _begin + _index;
var str = _buffer[_index];
_index++;