MrKWatkins.Ast Help

TextFilePosition Class

Definition

A SourcePosition in a text source code file.

public sealed class TextFilePosition : SourceFilePosition<TextFilePosition, TextFile>, IEquatable<SourcePosition>, IEqualityOperators<SourcePosition, SourcePosition, Boolean>, ITextSourcePosition

Properties

Name

Description

StartColumnIndex

Zero based index of the start column of the position in the text file.

StartColumnNumber

Number, i.e. 1 based index, of the start column of the position in the text file.

StartLine

The start line of the text source.

StartLineIndex

Zero based index of the start line of the position in the text file.

StartLineNumber

Number, i.e. 1 based index, of the start line of the position in the text file.

Text

The text source.

Methods

Name

Description

CreateCombination(TextFilePosition)

CreateZeroWidthPrefix()

Create a new TextFilePosition with zero width at the start of this TextFilePosition.

ToString()

WriteSourceForMessage(StringBuilder)

Operators

Name

Description

op_Addition(TextFilePosition, TextFilePosition)

Combines two TextFilePositions to give a new SourcePosition that includes both x and y along with any source in-between the two.

Last modified: 09 September 2024