[fast]の診断を英語化し単独行形式をテスト

このコミットが含まれているのは:
routersys committed 2026-07-05 16:37:10 +09:00
1 親 2bd54674c1
コミット e6165ca5a3
2ファイル変更
+22 -3

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

+3 -3
ファイルの表示
@@ -3,7 +3,7 @@ namespace LuaScript.Compat.Syntax.Rules
[LuaSyntaxRule(2)]
internal sealed class LuaFastRule : ILuaSyntaxRule
{
private const string Message = "[fast] は obj.fill / obj.convolve / obj.resize にのみ適用できます。";
private const string Message = "[fast]: only obj.fill, obj.convolve and obj.resize can be accelerated.";
public bool TryApply(LuaRewriteContext context)
{
@@ -25,16 +25,16 @@ namespace LuaScript.Compat.Syntax.Rules
if (targetIndex < 0 || context.Input[targetIndex].Kind != LuaSyntaxTokenKind.Name)
return false;
EmitBetween(context, closeIndex + 1, targetIndex);
if (TryResolveTarget(context, targetIndex, out int funcIndex, out string function))
{
EmitBetween(context, closeIndex + 1, targetIndex);
context.Index = funcIndex + 1;
context.EmitRaw("__fast_" + function);
return true;
}
context.AddDiagnostic(Message);
EmitBetween(context, closeIndex + 1, targetIndex);
context.Index = targetIndex;
return true;
}