mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Tidy script diagnostic helpers
This commit is contained in:
parent
7d7b880a7c
commit
a1b542dad6
1 changed files with 2 additions and 4 deletions
|
|
@ -72,9 +72,7 @@ namespace MinecraftClient.Scripting
|
|||
scriptMain = false;
|
||||
}
|
||||
|
||||
if (scriptMain)
|
||||
script.Add(new(i + 1, line));
|
||||
else extensions.Add(new(i + 1, line));
|
||||
(scriptMain ? script : extensions).Add(new(i + 1, line));
|
||||
}
|
||||
|
||||
//Add return statement if missing
|
||||
|
|
@ -178,7 +176,7 @@ namespace MinecraftClient.Scripting
|
|||
|
||||
private static string EscapeLineDirectivePath(string path)
|
||||
{
|
||||
return path.Replace("\\", "\\\\", StringComparison.Ordinal).Replace("\"", "\\\"", StringComparison.Ordinal);
|
||||
return path.Replace("\\", "\\\\").Replace("\"", "\\\"");
|
||||
}
|
||||
|
||||
private static string FormatCompilationFailure(Diagnostic failure, string scriptName)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue