ILexicalScope Interface
Provides the base requirements for a lexical scope.
public interface ILexicalScope
Properties
IsAncestorEndScopeCheckEnabled
Gets whether ancestor end scope checking is enabled while parsing inside the scope.
bool IsAncestorEndScopeCheckEnabled { get; }
Property Value
- System.Boolean:
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.
LexicalState
Gets the ILexicalState that defines the lexical scope.
ILexicalState LexicalState { get; }
Property Value
- ILexicalState:
The ILexicalState that defines the lexical scope.
ParentTransition
Gets the ILexicalStateTransition that is the parent of this scope.
ILexicalStateTransition ParentTransition { get; }
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.
object Tag { get; set; }
Property Value
- System.Object:
An System.Object that contains user-defined data about the object. The default is
null
.
Remarks
Any type derived from the System.Object class can be assigned to this property.
Transition
Gets the ILexicalStateTransition that this scope performs after ending.
ILexicalStateTransition Transition { get; }
Property Value
- ILexicalStateTransition:
The ILexicalStateTransition that this scope performs after ending.
If the value isnull
, 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.
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.
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.