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)

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

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 MergeableLexerResult IsScopeEnd(ITextBufferReader reader)
Parameter Type Description
reader ITextBufferReader

An ITextBufferReader that is reading a text source.

Returns

MergeableLexerResult:

A MergeableLexerResult indicating the lexer result.

IsScopeStart(ITextBufferReader)

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

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

An ITextBufferReader that is reading a text source.

Returns

MergeableLexerResult:

A MergeableLexerResult indicating the lexer result.

Inherited Members

Extension Methods