In This Article

ILexerTarget Interface

Provides the base requirements for an object that should receive parse output from a lexer.

public interface ILexerTarget

Properties

HasInitialContext

Gets whether an initial context is available, from which incremental parsing can resume.

bool HasInitialContext { get; }

Property Value

Boolean:

true if an initial context is available; otherwise, false.

Methods

OnPostParse(Int32)

Occurs after lexing ends.

void OnPostParse(int endOffset)
Parameter Type Description
endOffset Int32

The offset at which parsing has stopped.

OnPreParse(ref Int32)

Occurs before lexing starts.

ILexerContext OnPreParse(ref int startOffset)
Parameter Type Description
startOffset Int32

The offset at which parsing will commence.

Returns

ILexerContext:

A ILexerContext that contains information about the starting context.

OnTokenParsed(IToken, ILexicalScopeStateNode)

Occurs when an IToken is parsed by the lexer.

bool OnTokenParsed(IToken newToken, ILexicalScopeStateNode scopeStateNode)
Parameter Type Description
newToken IToken

The IToken that was parsed.

scopeStateNode ILexicalScopeStateNode

The ILexicalScopeStateNode at the start of the token.

Returns

Boolean:

true if the lexing should continue; otherwise, false.