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 an instance of the class.

protected LexicalScopeBase()

Properties

IsAncestorEndScopeCheckEnabled

Indicates 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

The ILexicalState that defines the lexical scope.

protected ILexicalState? LexicalStateCore { get; set; }

Property Value

ILexicalState

ParentTransitionCore

The ILexicalStateTransition that is the parent of this scope.

protected ILexicalStateTransition? ParentTransitionCore { get; set; }

Property Value

ILexicalStateTransition

Tag

The object that contains user-defined data about the object.

public object? Tag { get; set; }

Property Value

object

Transition

The ILexicalStateTransition that this scope performs after ending or null if no state transition is performed when the scope ends.

public ILexicalStateTransition? Transition { get; set; }

Property Value

ILexicalStateTransition

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