Skip to content

TokenReader<TKind>.PositionFrom Method ​

Definition ​

Creates a TextFilePosition spanning from the specified token up to and including the last token consumed. Typically used to set the position of a node from the token that started it once parsing of the node has finished.

c#
public TextFilePosition PositionFrom(Token<TKind> start);

View source

Parameters ​

NameTypeDescription
startToken<TKind>The token the position starts at.

Returns ​

TextFilePosition

A TextFilePosition spanning from start to the last token consumed.