Skip to content
siegi44 edited this page Sep 15, 2009 · 6 revisions

Note this list is not finished. You can help and finish the list.

Nodes

Full list of nodes.

SyntaxDefinition

It is the root element for the syntax definition. It is compulsory for the syntax highlighter.

Attributes

  • name: The name of the mode. This is used when you, in the defintion of a RuleSet refers to another mode. I.e., one that is defined in an external file. For an example of this see the HTML-Mode that uses the JavaScript-mode this way.
  • extends: Optional. With this you can extend an existing definition. Use the name of the other definition. The HighlightingManager will look for it, but both definition-files must be in the same directory.
  • extensions: Optional. The file extensions that the mode is applicable for. Extensions must be written with lower case and should include the ., as in .txt. If several extensions are applicable they should be separated with ‘;‘.

Example

{{<esc><SyntaxDefinition name="Example" extensions=".ex;.ext;.exf" extends="C#"> <!&ndash;&ndash; definitions ... &ndash;&ndash;> </SyntaxDefinition> </esc>}}

Environment

Contains a list of "EnvironmentEntry"-Tags or "CustomEnvironmentEntry"-Tags.

Properties

Contains a list of "Property"-Tags.

Digits

Defines the rendering of all digits in the definition.

Attributes

  • name: Optional. Just sets a name for the element, in case of the <Digits>-element, set it to "Digits".
  • bold: Optional. Accepts "true" or "false". Defines if the digits are rendered bold or not.
  • italic: Optional. Accepts "true" or "false". Defines if the digits are rendered italic or not.
  • color: Optional. Accepts all color names from System.Drawing.Color. Defines the color of the text.
  • bgcolor: Optional. Accepts all color names from System.Drawing.Color. Defines the color of the background.

Example

{{<esc><Digits name="Digits" bold="false" italic="false" color="DarkBlue" /></esc>}}

Rule sets

The RuleSets tag defines the rule sets that are used in the mode, it's just a grouping of the set of rule sets for a mode. You can connect rule sets with each other. Note that all modes are defined in a flat structure even if they are used recursively.

For an example of a mode that uses multiple rule sets see the XML-mode. There is a top level rule-set and and another rule-set that handles highligting within a tag, i.e., between < and >.

Rule set

Each rule set is a set of keyword lists, spans and additional rules like MarkPrevious and MarkFollowing.

Attributes

  • name: Each rule set should have a name, except the default rule set. The highlighting parser will look for the default rule set.
  • reference: Optional. With this you can reference a rule set from another highlighting definition. (Like the extends attribute in <SyntaxDefinition>.)
  • ignorecase: Optional. Accepts "true" and "false". Defines if the character caseing is important for the highlighting of the keywords.
  • noescapesequences: Optional. Obsolete. Accepts "true" and "false". Defines if the rule set has escape sequences or not.
  • escapecharacter: Optional. Accepts a char. Defines the escape character for the rule set.

Example

`{{ <!–– ... ––>

<RuleSets>
    <RuleSet ignorecase="true">
        <!&ndash;&ndash; ... &ndash;&ndash;>
    </RuleSet>
</RuleSets>
`}}

Delimiters

Defines the delimiting characters of the syntax, e.g., the characters that, "break up" a line into separate symbols, typically key words. It is not necessary, or desirable to include the characters that denote the start or end of a span. Space and Tab are implicitly defined as delimeters and they don't need to be included explicitly (this will probably be changed at some future time).

Example

`{{ <!–– ... ––>

<RuleSets>
    <RuleSet ignorecase="true">
        <Delimiters>&amp;amp;&amp;lt;&amp;gt;~!@$%^*()-+=|\#/{}[]:;"' ,	.?</Delimiters>
        
        <!&ndash;&ndash; ... &ndash;&ndash;>
    </RuleSet>
</RuleSets>
`}}

Spans

Clone this wiki locally