Summary of Changes (from Moonshine version 0.9.7-1.0.x format)
|
|
|
Summary
Syntax files are used to store syntax highlighting rules for use in brew or in the captured commands window. A syntax file must begin with the line:
Object Types
Name | Description |
tag | A tag is used to identify the placement and content of a list or block. |
string | a sequence of characters |
list | A list is a comma separated series of strings ended by a new line |
block | A block is a series one or more lists ended by a double-newline |
Rules for Tags
|
|
|
|
Recognized Tags
Tag | Description |
background color | a color (e.g. green) or an RBG value proceded by a # (e.g. #00FFFF) |
forground color | a color (e.g. green) or an RBG value proceded by a # (e.g. #00FFFF) |
syntax | syntax definitions block |
colors | color definitions block |
The Syntax Definitions Block
This is a list of syntax definitions.
Syntax Definitions Block Format
id | , | parent id | , | syntax element type | , | syntax element |
Description of Fields
id | used to identify the syntax element if used as a parent and to identify the default color to use. multiple syntax definitions may share an id |
parent id | refers to another syntax definition. this definition will only be valid
within that parent syntax. use <none> if their is no parent |
syntax element type | One of: keyword, regex, block, line |
syntax element | the text of the syntax element. the format of this depends on which sayntax element type is being used |
Syntax Element Types
element type | example definition | description |
keyword | decl, <none>, keyword, int | matches on literal text |
regex | directive, <none>, regex, #.* | matches a Qt-style regular expression |
line | comment, <none>, line, // | matches from the given literal text (inclusive) to the next newline |
block | comment, <none>, block, /* */ | matches from starting text to ending text (inclusive) |
Color Block Format
id | , | color | ||
id | , | color | , | styles |
Description of Fields
id | maps this color to a syntax definition |
color | a color (e.g. green) or an RBG value proceded by a # (e.g. #00FFFF) |
styles | a space separated list of styles. Supported styles are: italics, bold |