public readonly record struct NodeSpanWhich lines of a generated file one node wrote.
Remarks
Lines and not offsets, because a node emits statements and a Raven statement is a line. RavenEmitter.Emit says so in its own remarks — nothing wraps — so a line range is the finest resolution the emitter can honestly claim, and a character range would be a precision the mapping does not have.
⚠ A span is where the text is, and the node is where the author is. A diagnostic's Node is the thing to select; this is only good for putting a squiggle in the "show generated code" pane beside it. Sending an author to a line of a file they never wrote and calling that the answer is worse than saying nothing, which is why both travel together and the node is the one that is never empty.
Fields and properties (4)
public int LineThe first, counted from zero.
public int LinesHow many, or zero when there is no span.
public static NodeSpan NoneNo span at all.
public bool IsNoneWhether this names nothing.
Methods (3)
public NodeSpan(int Line, int Lines)Which lines of a generated file one node wrote.
public bool Contains(int line)Whether a line of the generated file falls inside it.
public override string ToString()Returns the fully qualified type name of this instance.
Used by (14)
- NodeDiagnosticVixen.Editor.NodeGraph
- ShaderGraphCompilerVixen.Editor.ShaderGraph
- ShaderGraphSourceVixen.Editor.ShaderGraph
- ShaderGraphSpanVixen.Editor.ShaderGraph
- ShaderGraphSpanTestsVixen.Editor.ShaderGraph.Tests
- ShaderGraphTestsVixen.Editor.AssetEditors.Tests
- ShaderGraphViewVixen.Editor.AssetEditors
- SurfaceGraphTestsVixen.Editor.ShaderGraph.Tests
- TextureEmitterVixen.Editor.TextureGraph
- TextureGraphExpressionsVixen.Editor.TextureGraph
- TextureGraphParameterTestsVixen.Editor.TextureGraph.Tests
- TexturePixelProblemVixen.Editor.TextureGraph
- TexturePixelProcessorVixen.Editor.TextureGraph
- TexturePixelProcessorTestsVixen.Editor.TextureGraph.Tests