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

bool:

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

Methods

OnPostParse(int)

Occurs after lexing ends.

void OnPostParse(int endOffset)
Parameter Type Description
endOffset int

The offset at which parsing has stopped.

OnPreParse(ref int)

Occurs before lexing starts.

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

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

bool:

true if the lexing should continue; otherwise, false.