拡張構文の書き換え診断を全経路へ通す
このコミットが含まれているのは:
6ファイル変更
+46
-16
検索条件に一致するファイルはありません
@@ -8,6 +8,7 @@ namespace LuaScript.Compat.Syntax
|
||||
private readonly List<LuaSyntaxToken> _input;
|
||||
private readonly List<LuaSyntaxToken> _output;
|
||||
private List<int>? _changedLines;
|
||||
private List<LuaRewriteDiagnostic>? _diagnostics;
|
||||
private int _line = 1;
|
||||
private int _lastChangedLine;
|
||||
private int _temporaries;
|
||||
@@ -28,6 +29,14 @@ namespace LuaScript.Compat.Syntax
|
||||
|
||||
public int[] ChangedLines => _changedLines is null ? [] : _changedLines.ToArray();
|
||||
|
||||
public LuaRewriteDiagnostic[] Diagnostics => _diagnostics is null ? [] : _diagnostics.ToArray();
|
||||
|
||||
public void AddDiagnostic(string message)
|
||||
{
|
||||
(_diagnostics ??= new List<LuaRewriteDiagnostic>()).Add(new LuaRewriteDiagnostic(_line, message));
|
||||
MarkChanged();
|
||||
}
|
||||
|
||||
public bool AtEnd => Index >= _input.Count;
|
||||
|
||||
public LuaSyntaxToken Current => _input[Index];
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
namespace LuaScript.Compat.Syntax
|
||||
{
|
||||
internal readonly record struct LuaRewriteDiagnostic(int Line, string Message);
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする