In This Article

MergableTokenReader Class

Represents an object that can provide tokens to a ILLParser in a forward-only direction for a IMergableLexer.

public class MergableTokenReader : TokenReaderBase, ITokenReader
Inheritance:
Object TokenReaderBase Object
Derived:
CSharpTokenReader JavaScriptTokenReader PythonTokenReader VBTokenReader XmlTokenReader
Implements:
ITokenReader

Constructors

MergableTokenReader(ITextBufferReader, IMergableLexer)

Initializes a new instance of the MergableTokenReader class.

public MergableTokenReader(ITextBufferReader reader, IMergableLexer rootLexer)
Parameter Type Description
reader ITextBufferReader

The ITextBufferReader to use for consuming text.

rootLexer IMergableLexer

The root IMergableLexer.

Methods

GetNextToken()

Returns the next IToken that will be consumed by the token reader.

protected override IToken GetNextToken()

Returns

IToken:

The next IToken that will be consumed by the token reader.

Pop()

Pops the top token reader state from the stack and restores the token reader to that state.

public override bool Pop()

Returns

Boolean:

true if a pop occurred; otherwise, false.

Push()

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

public override void Push()

Remarks

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

Inherited Members