In This Article

MergableLexerCoordinator Class

Coordinates lexer and state shifting for one or more mergable lexers.

public class MergableLexerCoordinator
Inheritance:
object object

Remarks

Features include:

Methods

Create(ITextBufferReader, IMergableLexer)

Creates an instance of a coordinator for the specified ITextBufferReader and IMergableLexer.

public static MergableLexerCoordinator Create(ITextBufferReader reader, IMergableLexer rootLexer)
Parameter Type Description
reader ITextBufferReader

The ITextBufferReader to use.

rootLexer IMergableLexer

The root IMergableLexer.

Returns

MergableLexerCoordinator:

The MergableLexerCoordinator that was created.

GetNextToken()

Returns the next IMergableToken.

public IMergableToken GetNextToken()

Returns

IMergableToken:

The next IMergableToken.

Parse(TextSnapshotRange, ILexerTarget)

Lexically parses the specified TextRange of the ITextSnapshot.

public static TextRange Parse(TextSnapshotRange snapshotRange, ILexerTarget lexerTarget)
Parameter Type Description
snapshotRange TextSnapshotRange

A TextSnapshotRange indicating the offset range to parse.

lexerTarget ILexerTarget

The ILexerTarget to update.

Returns

TextRange:

A TextRange that was parsed.

Pop()

Pops the top coordinator state from the stack and restores the coordinator to that state.

public bool Pop()

Returns

bool:

true if a pop occurred; otherwise, false.

Push()

Pushes the coordinator state onto a stack for later restoration, generally to begin a multiple token look-ahead operation.

public void Push()

Remarks

Any call to this method must have a corresponding Pop() call.

Inherited Members