Open sandboxFocus

Struct SourceSpan

Represents a span of source code.

Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public readonly struct SourceSpan
Remarks

To obtain a SourceSpan, access the Sources property on any declaration. to get an enumeration of SourceReference, then access the Span property.

Constructors

Name Description
SourceSpan(string, object, int, int, int, int, int, int, string)

Initializes a new instance of the SourceSpan struct.

Properties

Name Description
EndColumn

Gets the start end (zero-based).

EndLine

Gets the end line (zero-based).

FilePath

Gets the path of the source file.

StartColumn

Gets the start column (zero-based).

StartLine

Gets the start line (zero-based).

Methods

Name Description
GetText()

Gets the text representation (i.e. the source code) of the current syntax node or token.

ToString()

See Also