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.

public TextFilePosition PositionFrom(Token<TKind> start);

View source

Parameters

Name Type Description
start Token<TKind> The token the position starts at.

Returns

TextFilePosition

A TextFilePosition spanning from start to the last token consumed.