Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
2,519 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/** | ||
* Twilight theme | ||
* | ||
* Adapted from Michael Sheets' TextMate theme of the same name | ||
* | ||
* @author Michael Sheets | ||
* @author Jesse Farmer <jesse@20bits.com> | ||
* @version 1.0.1 | ||
*/ | ||
pre { | ||
background: #141414; | ||
word-wrap: break-word; | ||
margin: 0px; | ||
padding: 10px; | ||
color: #F8F8F8; | ||
font-size: 14px; | ||
margin-bottom: 20px; | ||
} | ||
|
||
pre, code { | ||
font-family: 'Monaco', courier, monospace; | ||
} | ||
|
||
pre .comment { | ||
color: #5F5A60; | ||
} | ||
|
||
pre .constant.numeric { | ||
color: #D87D50; | ||
} | ||
|
||
pre .constant { | ||
color: #889AB4; | ||
} | ||
|
||
pre .constant.symbol, pre .constant.language { | ||
color: #D87D50; | ||
} | ||
|
||
pre .storage { | ||
color: #F9EE98; | ||
} | ||
|
||
pre .string { | ||
color: #8F9D6A; | ||
} | ||
|
||
pre .string.regexp { | ||
color: #E9C062; | ||
} | ||
|
||
pre .keyword, pre .selector, pre .storage { | ||
color: #CDA869; | ||
} | ||
|
||
pre .inherited-class { | ||
color: #9B5C2E; | ||
} | ||
|
||
pre .entity { | ||
color: #FF6400; | ||
} | ||
|
||
pre .support { | ||
color: #9B859D; | ||
} | ||
|
||
pre .support.magic { | ||
color: #DAD69A; | ||
} | ||
|
||
pre .variable { | ||
color: #7587A6; | ||
} | ||
|
||
pre .function, pre .entity.class { | ||
color: #9B703F; | ||
} | ||
|
||
pre .support.class-name, pre .support.type { | ||
color: #AB99AC; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/** | ||
* C patterns | ||
* | ||
* @author Daniel Holden | ||
* @author Craig Campbell | ||
* @version 1.0.7 | ||
*/ | ||
Rainbow.extend('c', [ | ||
{ | ||
'name': 'meta.preprocessor', | ||
'matches': { | ||
1: [ | ||
{ | ||
'matches': { | ||
1: 'keyword.define', | ||
2: 'entity.name' | ||
}, | ||
'pattern': /(\w+)\s(\w+)\b/g | ||
}, | ||
{ | ||
'name': 'keyword.define', | ||
'pattern': /endif/g | ||
}, | ||
{ | ||
'name': 'constant.numeric', | ||
'pattern': /\d+/g | ||
}, | ||
{ | ||
'matches': { | ||
1: 'keyword.include', | ||
2: 'string' | ||
}, | ||
'pattern': /(include)\s(.*?)$/g | ||
} | ||
] | ||
}, | ||
'pattern': /\#([\S\s]*?)$/gm | ||
}, | ||
{ | ||
'name': 'keyword', | ||
'pattern': /\b(do|goto|typedef)\b/g | ||
}, | ||
{ | ||
'name': 'entity.label', | ||
'pattern': /\w+:/g | ||
}, | ||
{ | ||
'matches': { | ||
1: 'storage.type', | ||
3: 'storage.type', | ||
4: 'entity.name.function' | ||
}, | ||
'pattern': /\b((un)?signed|const)? ?(void|char|short|int|long|float|double)\*? +((\w+)(?= ?\())?/g | ||
}, | ||
{ | ||
'matches': { | ||
2: 'entity.name.function' | ||
}, | ||
'pattern': /(\w|\*) +((\w+)(?= ?\())/g | ||
}, | ||
{ | ||
'name': 'storage.modifier', | ||
'pattern': /\b(static|extern|auto|register|volatile|inline)\b/g | ||
}, | ||
{ | ||
'name': 'support.type', | ||
'pattern': /\b(struct|union|enum)\b/g | ||
} | ||
]); |
125 changes: 125 additions & 0 deletions
125
hawtio-web/src/main/webapp/lib/language/coffeescript.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
/** | ||
* Coffeescript patterns | ||
* | ||
* @author Craig Campbell | ||
* @version 1.0 | ||
*/ | ||
Rainbow.extend('coffeescript', [ | ||
{ | ||
'name': 'comment.block', | ||
'pattern': /(\#{3})[\s\S]*\1/gm | ||
}, | ||
{ | ||
'name': 'string.block', | ||
'pattern': /('{3}|"{3})[\s\S]*\1/gm | ||
}, | ||
|
||
/** | ||
* multiline regex with comments | ||
*/ | ||
{ | ||
'name': 'string.regex', | ||
'matches': { | ||
2: { | ||
'name': 'comment', | ||
'pattern': /\#(.*?)\n/g | ||
} | ||
}, | ||
'pattern': /(\/{3})([\s\S]*)\1/gm | ||
}, | ||
{ | ||
'matches': { | ||
1: 'keyword' | ||
}, | ||
'pattern': /\b(in|when|is|isnt|of|not|unless|until|super)(?=\b)/gi | ||
}, | ||
{ | ||
'name': 'keyword.operator', | ||
'pattern': /\?/g | ||
}, | ||
{ | ||
'name': 'constant.language', | ||
'pattern': /\b(undefined|yes|on|no|off)\b/g | ||
}, | ||
{ | ||
'name': 'keyword.variable.coffee', | ||
'pattern': /@(\w+)/gi | ||
}, | ||
|
||
/** | ||
* reset global keywards from generic | ||
*/ | ||
{ | ||
'name': 'reset', | ||
'pattern': /object|class|print/gi | ||
}, | ||
|
||
/** | ||
* named function | ||
*/ | ||
{ | ||
'matches' : { | ||
1: 'entity.name.function', | ||
2: 'keyword.operator', | ||
3: { | ||
'name': 'function.argument.coffee', | ||
'pattern': /([\@\w]+)/g | ||
}, | ||
4: 'keyword.function' | ||
}, | ||
'pattern': /(\w+)\s{0,}(=|:)\s{0,}\((.*?)((-|=)>)/gi | ||
}, | ||
|
||
/** | ||
* anonymous function | ||
*/ | ||
{ | ||
'matches': { | ||
1: { | ||
'name': 'function.argument.coffee', | ||
'pattern': /([\@\w]+)/g | ||
}, | ||
2: 'keyword.function' | ||
}, | ||
'pattern': /\s\((.*?)\)\s{0,}((-|=)>)/gi | ||
}, | ||
|
||
/** | ||
* direct function no arguments | ||
*/ | ||
{ | ||
'matches' : { | ||
1: 'entity.name.function', | ||
2: 'keyword.operator', | ||
3: 'keyword.function' | ||
}, | ||
'pattern': /(\w+)\s{0,}(=|:)\s{0,}((-|=)>)/gi | ||
}, | ||
|
||
/** | ||
* class definitions | ||
*/ | ||
{ | ||
'matches': { | ||
1: 'storage.class', | ||
2: 'entity.name.class', | ||
3: 'storage.modifier.extends', | ||
4: 'entity.other.inherited-class' | ||
}, | ||
'pattern': /\b(class)\s(\w+)(\sextends\s)?([\w\\]*)?\b/g | ||
}, | ||
|
||
/** | ||
* object instantiation | ||
*/ | ||
{ | ||
'matches': { | ||
1: 'keyword.new', | ||
2: { | ||
'name': 'support.class', | ||
'pattern': /\w+/g | ||
} | ||
}, | ||
'pattern': /\b(new)\s(.*?)(?=\s)/g | ||
} | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/** | ||
* C# patterns | ||
* | ||
* @author Dan Stewart | ||
* @version 1.0.1 | ||
*/ | ||
Rainbow.extend('csharp', [ | ||
{ | ||
// @see http://msdn.microsoft.com/en-us/library/23954zh5.aspx | ||
'name': 'constant', | ||
'pattern': /\b(false|null|true)\b/g | ||
}, | ||
{ | ||
// @see http://msdn.microsoft.com/en-us/library/x53a06bb%28v=vs.100%29.aspx | ||
// Does not support putting an @ in front of a keyword which makes it not a keyword anymore. | ||
'name': 'keyword', | ||
'pattern': /\b(abstract|add|alias|ascending|as|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|descending|double|do|dynamic|else|enum|event|explicit|extern|false|finally|fixed|float|foreach|for|from|get|global|goto|group|if|implicit|int|interface|internal|into|in|is|join|let|lock|long|namespace|new|object|operator|orderby|out|override|params|partial|private|protected|public|readonly|ref|remove|return|sbyte|sealed|select|set|short|sizeof|stackalloc|static|string|struct|switch|this|throw|try|typeof|uint|unchecked|ulong|unsafe|ushort|using|value|var|virtual|void|volatile|where|while|yield)\b/g | ||
}, | ||
{ | ||
'matches': { | ||
1: 'keyword', | ||
2: { | ||
'name': 'support.class', | ||
'pattern': /\w+/g | ||
} | ||
}, | ||
'pattern': /(typeof)\s([^\$].*?)(\)|;)/g | ||
}, | ||
{ | ||
'matches': { | ||
1: 'keyword.namespace', | ||
2: { | ||
'name': 'support.namespace', | ||
'pattern': /\w+/g | ||
} | ||
}, | ||
'pattern': /\b(namespace)\s(.*?);/g | ||
}, | ||
{ | ||
'matches': { | ||
1: 'storage.modifier', | ||
2: 'storage.class', | ||
3: 'entity.name.class', | ||
4: 'storage.modifier.extends', | ||
5: 'entity.other.inherited-class' | ||
}, | ||
'pattern': /\b(abstract|sealed)?\s?(class)\s(\w+)(\sextends\s)?([\w\\]*)?\s?\{?(\n|\})/g | ||
}, | ||
{ | ||
'name': 'keyword.static', | ||
'pattern': /\b(static)\b/g | ||
}, | ||
{ | ||
'matches': { | ||
1: 'keyword.new', | ||
2: { | ||
'name': 'support.class', | ||
'pattern': /\w+/g | ||
} | ||
|
||
}, | ||
'pattern': /\b(new)\s([^\$].*?)(?=\)|\(|;|&)/g | ||
}, | ||
{ | ||
'name': 'string', | ||
'pattern': /(")(.*?)\1/g | ||
}, | ||
{ | ||
'name': 'integer', | ||
'pattern': /\b(0x[\da-f]+|\d+)\b/g | ||
}, | ||
{ | ||
'name': 'comment', | ||
'pattern': /\/\*[\s\S]*?\*\/|(\/\/)[\s\S]*?$/gm | ||
}, | ||
{ | ||
'name': 'operator', | ||
// @see http://msdn.microsoft.com/en-us/library/6a71f45d%28v=vs.100%29.aspx | ||
// ++ += + -- -= - <<= << <= => >>= >> >= != ! ~ ^ || && &= & ?? :: : *= * |= %= |= == = | ||
'pattern': /(\+\+|\+=|\+|--|-=|-|<<=|<<|<=|=>|>>=|>>|>=|!=|!|~|\^|\|\||&&|&=|&|\?\?|::|:|\*=|\*|\/=|%=|\|=|==|=)/g | ||
}, | ||
{ | ||
// @see http://msdn.microsoft.com/en-us/library/ed8yd1ha%28v=vs.100%29.aspx | ||
'name': 'preprocessor', | ||
'pattern': /(\#if|\#else|\#elif|\#endif|\#define|\#undef|\#warning|\#error|\#line|\#region|\#endregion|\#pragma)[\s\S]*?$/gm | ||
} | ||
], true); |
Oops, something went wrong.