TTMSFNCMemoCustomLanguageAction Class
Describes the action taken by the tokenizer when a rule's regex matches: which token to emit, which state to transition to, and any conditional sub-actions.
API unit family: TMSFNCMemoCustomLanguage
Inherits from: TCollectionItem
Syntax
TTMSFNCMemoCustomLanguageAction = class(TCollectionItem)
Properties
| Name | Description |
|---|---|
| Bracket | Whether this rule contributes an open or close bracket event, enabling bracket matching in the editor. |
| Cases | Conditional sub-actions evaluated against the matched text to choose which token and state transition to apply. |
| GoBack | Number of characters to back up in the input after the rule matches; use -1 (the default) to disable go-back. |
| Group | A group of actions applied sequentially when the rule uses capture groups; each action in the group corresponds to a regex capture group. |
| LogMessage | Diagnostic message logged to the browser console when this action fires; useful during language grammar development. |
| Next | Name of the tokenizer state to push and transition to after this rule matches; leave empty to stay in the current state. |
| NextEmbedded | Name of an embedded language grammar to activate; used to switch between languages within a single file (e.g. HTML inside JavaScript). |
| SwitchTo | Name of the tokenizer state to switch to without pushing the current state onto the stack. |
| Token | Token name or classification emitted when the tokenizer matches the associated rule regex. |
Methods
| Name | Description |
|---|---|
| AsJSObject | Serialises this action as a Monaco-compatible JavaScript action object or string value. |