In This Article

LexicalScopeBase Class

Provides the abstract base class for a lexical scope.

public abstract class LexicalScopeBase : ILexicalScope
Inheritance:
object object
Derived:
DynamicLexicalScope ProgrammaticLexicalScope
Implements:
ILexicalScope

Constructors

LexicalScopeBase()

Initializes a new instance of the LexicalScopeBase class.

protected LexicalScopeBase()

Properties

IsAncestorEndScopeCheckEnabled

Gets or sets whether ancestor end scope checking is enabled while parsing inside the scope.

public bool IsAncestorEndScopeCheckEnabled { get; set; }

Property Value

bool:

true if ancestor end scope checking is enabled; otherwise, false.

Remarks

When enabled, this allows ancestor scopes to be examined to see a pattern matches their end scope. In the event a match is found, this scope exits as well as the ancestor's scope.

LexicalStateCore

Gets or sets the ILexicalState that defines the lexical scope.

protected ILexicalState LexicalStateCore { get; set; }

Property Value

ILexicalState:

The ILexicalState that defines the lexical scope.

ParentTransitionCore

Gets or sets the ILexicalStateTransition that is the parent of this scope.

protected ILexicalStateTransition ParentTransitionCore { get; set; }

Property Value

ILexicalStateTransition:

The ILexicalStateTransition that is the parent of this scope.

Tag

Gets or sets the object that contains user-defined data about the object.

public object Tag { get; set; }

Property Value

object:

An object that contains user-defined data about the object. The default is null.

Remarks

Any type derived from the object class can be assigned to this property.

Transition

Gets or sets the ILexicalStateTransition that this scope performs after ending.

public ILexicalStateTransition Transition { get; set; }

Property Value

ILexicalStateTransition:

The ILexicalStateTransition that this scope performs after ending.
If the value is null, then no state transition is performed when the scope ends.

Remarks

The state transition may be made to a child language.

Methods

IsScopeEnd(ITextBufferReader)

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

public abstract 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 abstract 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