TTMSFNCMemoCustomLanguageRules.Add Method
Appends a new empty tokenizer rule to the state.
API unit family: TMSFNCMemoCustomLanguage
Declaring type: TTMSFNCMemoCustomLanguageRules
Overloads
Overload 1
Appends a new empty tokenizer rule to the state.
function Add: TTMSFNCMemoCustomLanguageRule; overload;
Returns
The newly created TTMSFNCMemoCustomLanguageRule instance.
Overload 2
Appends a new tokenizer rule with the specified regex pattern and token name to emit on match.
function Add(ARegex: string; AActionToken: string): TTMSFNCMemoCustomLanguageRule; overload;
Parameters
| Name | Description |
|---|---|
ARegex |
Regular expression pattern to match against the input. |
AActionToken |
Token classification emitted when the pattern matches. |
Returns
The newly created TTMSFNCMemoCustomLanguageRule instance.
Overload 3
Appends a new tokenizer rule with the specified regex pattern, token name, and next state to transition to.
function Add(ARegex: string; AActionToken: string; AActionNext: string): TTMSFNCMemoCustomLanguageRule; overload;
Parameters
| Name | Description |
|---|---|
ARegex |
Regular expression pattern to match against the input. |
AActionToken |
Token classification emitted when the pattern matches. |
AActionNext |
Name of the tokenizer state to push and enter after matching. |
Returns
The newly created TTMSFNCMemoCustomLanguageRule instance.
Overload 4
Appends a new tokenizer rule with the specified regex, token name, bracket kind, and next state.
function Add(ARegex: string; AActionToken: string; AActionBracket: TTMSFNCMemoCustomLanguageBracketKind; AActionNext: string): TTMSFNCMemoCustomLanguageRule; overload;
Parameters
| Name | Description |
|---|---|
ARegex |
Regular expression pattern to match against the input. |
AActionToken |
Token classification emitted when the pattern matches. |
AActionBracket |
Whether the matched token is an open or close bracket. |
AActionNext |
Name of the tokenizer state to push and enter after matching. |
Returns
The newly created TTMSFNCMemoCustomLanguageRule instance.