拡張構文の書き換え診断を全経路へ通す

このコミットが含まれているのは:
routersys committed 2026-07-05 16:12:44 +09:00
1 親 56c38b2891
コミット a03ba45f2a
6ファイル変更
+46 -16

検索条件に一致するファイルはありません

+4 -3
ファイルの表示
@@ -6,10 +6,10 @@ namespace LuaScript.Compat
{
public static string Rewrite(string source) => RewriteWithMap(source).Code;
public static (string Code, int[] ChangedLines) RewriteWithMap(string source)
public static (string Code, int[] ChangedLines, LuaRewriteDiagnostic[] Diagnostics) RewriteWithMap(string source)
{
if (string.IsNullOrEmpty(source))
return (source, []);
return (source, [], []);
var tokens = LuaSyntaxLexer.Tokenize(source);
var context = new LuaRewriteContext(tokens);
@@ -42,7 +42,8 @@ namespace LuaScript.Compat
}
}
return context.Changed ? (context.Serialize(), context.ChangedLines) : (source, []);
var diagnostics = context.Diagnostics;
return context.Changed ? (context.Serialize(), context.ChangedLines, diagnostics) : (source, [], diagnostics);
}
}
}