In This Article

ProgrammaticLexicalScope Class

Provides a lexical scope implementation that uses two delegates to perform the IsScopeStart(ITextBufferReader) and IsScopeEnd(ITextBufferReader) checks.

public class ProgrammaticLexicalScope : LexicalScopeBase, ILexicalScope
Inheritance:
object LexicalScopeBase object
Implements:
ILexicalScope

Constructors

ProgrammaticLexicalScope(ProgrammaticLexicalScopeMatch, ProgrammaticLexicalScopeMatch)

Initializes a new instance of the ProgrammaticLexicalScope class.

public ProgrammaticLexicalScope(ProgrammaticLexicalScopeMatch isScopeStartDelegate, ProgrammaticLexicalScopeMatch isScopeEndDelegate)
Parameter Type Description
isScopeStartDelegate ProgrammaticLexicalScopeMatch

The ProgrammaticLexicalScopeMatch to use for matching the scope's start.

isScopeEndDelegate ProgrammaticLexicalScopeMatch

The ProgrammaticLexicalScopeMatch to use for matching the scope's end.

Methods

IsScopeEnd(ITextBufferReader)

Performs a lex to determine if the current text in the ITextBufferReader ends the lexical scope.

public override MergableLexerResult IsScopeEnd(ITextBufferReader reader)
Parameter Type Description
reader ITextBufferReader

An ITextBufferReader that is reading a text source.

Returns

MergableLexerResult:

A MergableLexerResult indicating the lexer result.

IsScopeStart(ITextBufferReader)

Performs a lex to determine if the current text in the ITextBufferReader starts the lexical scope.

public override MergableLexerResult IsScopeStart(ITextBufferReader reader)
Parameter Type Description
reader ITextBufferReader

An ITextBufferReader that is reading a text source.

Returns

MergableLexerResult:

A MergableLexerResult indicating the lexer result.

Inherited Members