LexicalStateBase Class
Provides the abstract base class for a lexical state.
public abstract class LexicalStateBase : ILexicalState, IKeyedObject
- Inheritance:
- object object
- Implements:
- ILexicalState IKeyedObject
Constructors
LexicalStateBase(int, string)
Initializes an instance of the class.
protected LexicalStateBase(int id, string key)
| Parameter | Type | Description |
|---|---|---|
| id | int | The ID of the lexical state. |
| key | string | The key of the lexical state. |
Properties
ChildLexicalStatesCore
The collection of child lexical states.
protected ILexicalStateCollection ChildLexicalStatesCore { get; }
Property Value
DefaultTokenId
The ID of the default token that this state assigns.
DefaultTokenKey
The key of the default token that this state assigns.
Id
The ID value that identifies the lexical state.
Key
A string-based key that identifies the lexical state.
LexerCore
The ILexer that contains the state.
LexicalScopesCore
The collection of lexical scopes.
Tag
The object that contains user-defined data about the object.
Transition
The ILexicalStateTransition that is performed immediately after a start scope match.
public ILexicalStateTransition? Transition { get; set; }
Property Value
Remarks
This provides a mechanism to automatically transition to another language when this state's start scope is matched. This state's end scope may be used to exit the child language.
ASP-style tags are an example of when to use this transition.
Methods
CreateChildLexicalStates()
Creates the ILexicalStateCollection collection that is returned by ChildLexicalStatesCore.
protected virtual ILexicalStateCollection CreateChildLexicalStates()
Returns
CreateLexicalScopes()
Creates the ILexicalScopeCollection collection that is returned by LexicalScopesCore.
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()