Vixen
02b45cc4
csharp
public readonly record struct ScriptDiagnostic

One thing the compiler had to say about one place in one file.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

⚠ A span rather than a line of console text, which is the whole reason this path uses Roslyn in process. ProjectAssemblies runs dotnet build and hands back everything the console said, because a caller reporting a game build's failure has nowhere better to put it. A panel listing errors somebody can click is a different thing and needs the file, the line and the column as data.

Fields and properties (6)

  • public bool IsError

    Whether it stopped the build.

  • public string File

    The file, or empty for something not about a file.

  • public int Line

    The line, from one.

  • public int Column

    The column, from one.

  • public string Id

    The compiler's own code — CS0103.

  • public string Message

    What it said.

Methods (2)

  • public ScriptDiagnostic(bool IsError, string File, int Line, int Column, string Id, string Message)

    One thing the compiler had to say about one place in one file.

  • public override string ToString()

    The one-line form a console shows.

Used by (4)

  • EditorScriptTestsVixen.Editor.Scripts.Tests
  • ScriptBuildVixen.Editor.Scripts
  • ScriptCompilerVixen.Editor.Scripts
  • ScriptsModuleVixen.Editor.Scripts