More c/obj-c updates

This commit is contained in:
Garen Torikian 2012-09-09 22:56:00 -07:00 committed by nightwing
commit ab8c3076c5
12 changed files with 1130 additions and 102 deletions

View file

@ -72,7 +72,33 @@ int main( int argc, const char *argv[] ) {
NSChangeSpelling
@"0 != SUBQUERY(image, $x, 0 != SUBQUERY($x.bookmarkItems, $y, $y.@count == 0).@count).@count"
@selector(lowercaseString) @selector(uppercaseString:)
NSFetchRequest *localRequest = [[NSFetchRequest alloc] init];
localRequest.entity = [NSEntityDescription entityForName:@"VNSource" inManagedObjectContext:context];
localRequest.sortDescriptors = [NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"resolution" ascending:YES]];
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"0 != SUBQUERY(image, $x, 0 != SUBQUERY($x.bookmarkItems, $y, $y.@count == 0).@count).@count"];
[NSPredicate predicateWithFormat:]
NSString *predicateString = [NSString stringWithFormat:@"SELF beginsWith[cd] %@", searchString];
NSPredicate *pred = [NSPredicate predicateWithFormat:predicateString];
NSArray *filteredKeys = [[myMutableDictionary allKeys] filteredArrayUsingPredicate:pred];
localRequest.predicate = [NSPredicate predicateWithFormat:@"whichChart = %@" argumentArray: listChartToDownload];
localRequest.fetchBatchSize = 100;
arrayRequest = [context executeFetchRequest:localRequest error:&error1];
[localRequest release];
#ifndef Nil
#define Nil __DARWIN_NULL /* id of Nil class */
#endif
@implementation MyObject
- (unsigned int)areaOfWidth:(unsigned int)width
height:(unsigned int)height
{
return width*height;
}
@end

View file

@ -35,6 +35,9 @@ var oop = require("../lib/oop");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
// used by objective-c
var cFunctions = exports.cFunctions = "\\s*\\bhypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len)))\\b"
var c_cppHighlightRules = function() {
var keywordControls = (
@ -118,7 +121,7 @@ var c_cppHighlightRules = function() {
regex : "(?:#include|#pragma|#line|#define|#undef|#ifdef|#else|#elif|#endif|#ifndef)"
}, {
token : "support.function.C99.c",
regex : "\\s*\\bhypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len)))\\b"
regex : cFunctions
}, {
// function myFunc(arg) { }
token : [

View file

@ -41,24 +41,48 @@ define(function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var CHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules;
var escapedConstRe = "\\\\(?:[abefnrtv'\"?\\\\]|" +
"[0-3]\\d{1,2}|" +
"[4-7]\\d?|" +
"222|" +
"x[a-zA-Z0-9]+)";
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var C_Highlight_File = require("./c_cpp_highlight_rules");
var CHighlightRules = C_Highlight_File.c_cppHighlightRules;
var ObjectiveCHighlightRules = function() {
// regexp must not have capturing parentheses. Use (?:) instead.
// regexps are ordered -> the first match is used
var escapedConstRe = "\\\\(?:[abefnrtv'\"?\\\\]|" +
"[0-3]\\d{1,2}|" +
"[4-7]\\d?|" +
"222|" +
"x[a-zA-Z0-9]+)";
var specialVariables = [
{
"regex": "\\b_cmd\\b",
"token": "variable.other.selector.objc"
},
{
"regex": "\\b(?:self|super)\\b",
"token": "variable.language.objc"
}
];
var cRules = new CHighlightRules().getRules();
this.$rules =
{
"start": [
"start": [
{
token : "comment",
regex : "\\/\\/.*$"
},
DocCommentHighlightRules.getStartRule("doc-start"),
{
token : "comment", // multi line comment
merge : true,
regex : "\\/\\*",
next : "comment"
},
{
"token": [ "storage.type.objc", "punctuation.definition.storage.type.objc",
"entity.name.type.objc", "text", "punctuation.definition.entity.other.inherited-class.objc",
@ -68,10 +92,10 @@ var ObjectiveCHighlightRules = function() {
"next": "interface_protocol"
},
{
"token": [ "storage.type.objc", "punctuation.definition.storage.type.objc",
"entity.name.type.objc", "entity.other.inherited-class.objc"
"token": [ "storage.type.objc", "entity.name.type.objc",
"entity.other.inherited-class.objc"
],
"regex": "@(implementation)(\\s+[A-Za-z_][A-Za-z0-9_]*)(\\s*?::\\s*([A-Za-z][A-Za-z0-9]*))?",
"regex": "(@implementation)(\\s+[A-Za-z_][A-Za-z0-9_]*)(\\s*?::\\s*(?:[A-Za-z][A-Za-z0-9]*))?",
"next": "implementation"
},
{
@ -181,6 +205,11 @@ var ObjectiveCHighlightRules = function() {
"token": "punctuation.section.scope.begin.objc",
"regex": "\\[",
"next": "bracketed_content"
},
{
"token": "meta.function.objc",
"regex": "^(?:-|\\+)\\s*",
"next": "methods"
}
],
"interface_protocol": [
@ -251,24 +280,130 @@ var ObjectiveCHighlightRules = function() {
"next": "start"
},
{
"token": ["support.function.any-method.objc", "punctuation.separator.arguments.objc"],
"regex": "(?=predicateWithFormat:)(NSPredicate )(predicateWithFormat:)",
"token": ["support.function.any-method.objc"],
"regex": "(?:predicateWithFormat:| NSPredicate predicateWithFormat:)",
"next": "predicates"
},
{
"token": "support.function.C99.c",
"regex": C_Highlight_File.cFunctions
}
],
"predicates": [
{
"token": "punctuation.section.scope.end.objc",
"regex": "\]",
"next": "start"
},
{
"token": ["support.function.any-method.name-of-parameter.objc", "punctuation.separator.arguments.objc"],
"regex": "\\b(argument(?:Array|s))(:)"
},
{
"token": ["invalid.illegal.unknown-method.objc", "punctuation.separator.arguments.objc"],
"regex": "\\b(\w+)(:)"
},
{
"token": "punctuation.definition.string.begin.sdfsaf.objc",
"regex": '@"',
"next": "bracketed_strings"
}
],
"bracketed_strings": [
{
"token": "punctuation.section.scope.end.objc",
"regex": "\]",
"next": "start"
},
{
"token": "keyword.operator.logical.predicate.cocoa",
"regex": "\\b(?:AND|OR|NOT|IN)\\b"
},
{
"token": ["invalid.illegal.unknown-method.objc", "punctuation.separator.arguments.objc"],
"regex": "\\b(\w+)(:)"
},
{
"regex": "\\b(?:ALL|ANY|SOME|NONE)\\b",
"token": "constant.language.predicate.cocoa"
},
{
"regex": "\\b(?:NULL|NIL|SELF|TRUE|YES|FALSE|NO|FIRST|LAST|SIZE)\\b",
"token": "constant.language.predicate.cocoa"
},
{
"regex": "\\b(?:MATCHES|CONTAINS|BEGINSWITH|ENDSWITH|BETWEEN)\\b",
"token": "keyword.operator.comparison.predicate.cocoa"
},
{
"regex": "\\bC(?:ASEINSENSITIVE|I)\\b",
"token": "keyword.other.modifier.predicate.cocoa"
},
{
"regex": "\\b(?:ANYKEY|SUBQUERY|CAST|TRUEPREDICATE|FALSEPREDICATE)\\b",
"token": "keyword.other.predicate.cocoa"
},
{
"regex": escapedConstRe,
"token": "constant.character.escape.objc"
},
{
"regex": "\\\\.",
"token": "invalid.illegal.unknown-escape.objc"
},
{
"token": "string",
"regex": '[^"\\\\]'
},
{
"token": "punctuation.definition.string.end.objc",
"regex": "\"",
"next": "predicates"
}
],
"comment" : [
{
token : "comment", // closing comment
regex : ".*?\\*\\/",
next : "start"
}, {
token : "comment", // comment spanning whole line
merge : true,
regex : ".+"
}
],
"methods" : [
{
token : "meta.function.objc",
regex : "(?=\\{|#)|;",
next : "start"
}
]
}
// copy in C-Rules directly
for (var r in cRules) {
if (r == "start") {
for (var key in cRules[r]) {
this.$rules.start.push(cRules[r][key])
// copy in C-Rules directly
for (var r in cRules) {
if (r == "start") {
for (var key in cRules[r]) {
this.$rules.start.push(cRules[r][key])
}
}
else {
this.$rules[r] = cRules[r];
}
}
else {
this.$rules[r] = cRules[r];
var startRules = this.$rules.start;
for (var s in startRules) {
this.$rules.bracketed_content.push(startRules[s]);
}
}
for (var s in specialVariables) {
this.$rules.bracketed_content.push(specialVariables[s]);
}
this.embedRules(DocCommentHighlightRules, "doc-",
[ DocCommentHighlightRules.getEndRule("start") ]);
};
oop.inherits(ObjectiveCHighlightRules, CHighlightRules);

View file

@ -1233,79 +1233,7 @@
</dict>
</array>
</dict>
<key>preprocessor-rule-enabled-interface</key>
<dict>
<key>begin</key>
<string>^\s*(#(if)\s+(0*1)\b)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>meta.preprocessor.c</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.control.import.if.c</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>constant.numeric.preprocessor.c</string>
</dict>
</dict>
<key>end</key>
<string>^\s*(#\s*(endif)\b.*?(?:(?=(?://|/\*))|$))</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>^\s*(#\s*(else)\b).*</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>meta.preprocessor.c</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.control.import.else.c</string>
</dict>
</dict>
<key>contentName</key>
<string>comment.block.preprocessor.else-branch.c</string>
<key>end</key>
<string>(?=^\s*#\s*endif\b.*?(?:(?=(?://|/\*))|$))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#disabled</string>
</dict>
<dict>
<key>include</key>
<string>#pragma-mark</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string></string>
<key>end</key>
<string>(?=^\s*#\s*(else|endif)\b.*?(?:(?=(?://|/\*))|$))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#interface_innards</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>preprocessor-rule-other-implementation</key>
<dict>
<key>begin</key>

167
tool/chrome.css Normal file
View file

@ -0,0 +1,167 @@
.ace-chrome .ace_editor {
border: 2px solid rgb(159, 159, 159);
}
.ace-chrome .ace_editor.ace_focus {
border: 2px solid #327fbd;
}
.ace-chrome .ace_gutter {
background: #ebebeb;
color: #333;
overflow : hidden;
}
.ace-chrome .ace_print_margin {
width: 1px;
background: #e8e8e8;
}
.ace-chrome .ace_text-layer {
}
.ace-chrome .ace_cursor {
border-left: 2px solid black;
}
.ace-chrome .ace_cursor.ace_overwrite {
border-left: 0px;
border-bottom: 1px solid black;
}
.ace-chrome .ace_line .ace_invisible {
color: rgb(191, 191, 191);
}
.ace-chrome .ace_line .ace_constant.ace_buildin {
color: rgb(88, 72, 246);
}
.ace-chrome .ace_line .ace_constant.ace_language {
color: rgb(88, 92, 246);
}
.ace-chrome .ace_line .ace_constant.ace_library {
color: rgb(6, 150, 14);
}
.ace-chrome .ace_line .ace_invalid {
background-color: rgb(153, 0, 0);
color: white;
}
.ace-chrome .ace_line .ace_fold {
}
.ace-chrome .ace_line .ace_support.ace_function {
color: rgb(60, 76, 114);
}
.ace-chrome .ace_line .ace_support.ace_constant {
color: rgb(6, 150, 14);
}
.ace-chrome .ace_line .ace_support.ace_type,
.ace-chrome .ace_line .ace_support.ace_class {
color: rgb(109, 121, 222);
}
.ace-chrome .ace_variable.ace_parameter {
font-style:italic;
color:#FD971F;
}
.ace-chrome .ace_line .ace_keyword.ace_operator {
color: rgb(104, 118, 135);
}
.ace-chrome .ace_line .ace_comment {
color: #236e24;
}
.ace-chrome .ace_line .ace_comment.ace_doc {
color: #236e24;
}
.ace-chrome .ace_line .ace_comment.ace_doc.ace_tag {
color: #236e24;
}
.ace-chrome .ace_line .ace_constant.ace_numeric {
color: rgb(0, 0, 205);
}
.ace-chrome .ace_line .ace_variable {
color: rgb(49, 132, 149);
}
.ace-chrome .ace_line .ace_xml_pe {
color: rgb(104, 104, 91);
}
.ace-chrome .ace_entity.ace_name.ace_function {
color: #0000A2;
}
.ace-chrome .ace_markup.ace_markupine {
text-decoration:underline;
}
.ace-chrome .ace_markup.ace_heading {
color: rgb(12, 7, 255);
}
.ace-chrome .ace_markup.ace_list {
color:rgb(185, 6, 144);
}
.ace-chrome .ace_marker-layer .ace_selection {
background: rgb(181, 213, 255);
}
.ace-chrome .ace_marker-layer .ace_step {
background: rgb(252, 255, 0);
}
.ace-chrome .ace_marker-layer .ace_stack {
background: rgb(164, 229, 101);
}
.ace-chrome .ace_marker-layer .ace_bracket {
margin: -1px 0 0 -1px;
border: 1px solid rgb(192, 192, 192);
}
.ace-chrome .ace_marker-layer .ace_active_line {
background: rgba(0, 0, 0, 0.07);
}
.ace-chrome .ace_gutter_active_line {
background-color : #dcdcdc;
}
.ace-chrome .ace_marker-layer .ace_selected_word {
background: rgb(250, 250, 255);
border: 1px solid rgb(200, 200, 250);
}
.ace-chrome .ace_storage,
.ace-chrome .ace_line .ace_keyword,
.ace-chrome .ace_meta.ace_tag {
color: rgb(147, 15, 128);
}
.ace-chrome .ace_string.ace_regex {
color: rgb(255, 0, 0)
}
.ace-chrome .ace_line .ace_string{
color: #1A1AA6;
}
.ace-chrome .ace_entity.ace_other.ace_attribute-name{
color: #994409;
}
.ace-chrome .ace_indent-guide {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
}

155
tool/crimson_editor.css Normal file
View file

@ -0,0 +1,155 @@
.ace-crimson-editor .ace_editor {
border: 2px solid rgb(159, 159, 159);
}
.ace-crimson-editor .ace_editor.ace_focus {
border: 2px solid #327fbd;
}
.ace-crimson-editor .ace_gutter {
background: #ebebeb;
color: #333;
overflow : hidden;
}
.ace-crimson-editor .ace_gutter-layer {
width: 100%;
text-align: right;
}
.ace-crimson-editor .ace_print_margin {
width: 1px;
background: #e8e8e8;
}
.ace-crimson-editor .ace_text-layer {
color: rgb(64, 64, 64);
}
.ace-crimson-editor .ace_cursor {
border-left: 2px solid black;
}
.ace-crimson-editor .ace_cursor.ace_overwrite {
border-left: 0px;
border-bottom: 1px solid black;
}
.ace-crimson-editor .ace_line .ace_invisible {
color: rgb(191, 191, 191);
}
.ace-crimson-editor .ace_line .ace_identifier {
color: black;
}
.ace-crimson-editor .ace_line .ace_keyword {
color: blue;
}
.ace-crimson-editor .ace_line .ace_constant.ace_buildin {
color: rgb(88, 72, 246);
}
.ace-crimson-editor .ace_line .ace_constant.ace_language {
color: rgb(255, 156, 0);
}
.ace-crimson-editor .ace_line .ace_constant.ace_library {
color: rgb(6, 150, 14);
}
.ace-crimson-editor .ace_line .ace_invalid {
text-decoration: line-through;
color: rgb(224, 0, 0);
}
.ace-crimson-editor .ace_line .ace_fold {
}
.ace-crimson-editor .ace_line .ace_support.ace_function {
color: rgb(192, 0, 0);
}
.ace-crimson-editor .ace_line .ace_support.ace_constant {
color: rgb(6, 150, 14);
}
.ace-crimson-editor .ace_line .ace_support.ace_type,
.ace-crimson-editor .ace_line .ace_support.ace_class {
color: rgb(109, 121, 222);
}
.ace-crimson-editor .ace_line .ace_keyword.ace_operator {
color: rgb(49, 132, 149);
}
.ace-crimson-editor .ace_line .ace_string {
color: rgb(128, 0, 128);
}
.ace-crimson-editor .ace_line .ace_comment {
color: rgb(76, 136, 107);
}
.ace-crimson-editor .ace_line .ace_comment.ace_doc {
color: rgb(0, 102, 255);
}
.ace-crimson-editor .ace_line .ace_comment.ace_doc.ace_tag {
color: rgb(128, 159, 191);
}
.ace-crimson-editor .ace_line .ace_constant.ace_numeric {
color: rgb(0, 0, 64);
}
.ace-crimson-editor .ace_line .ace_variable {
color: rgb(0, 64, 128);
}
.ace-crimson-editor .ace_line .ace_xml_pe {
color: rgb(104, 104, 91);
}
.ace-crimson-editor .ace_marker-layer .ace_selection {
background: rgb(181, 213, 255);
}
.ace-crimson-editor .ace_marker-layer .ace_step {
background: rgb(252, 255, 0);
}
.ace-crimson-editor .ace_marker-layer .ace_stack {
background: rgb(164, 229, 101);
}
.ace-crimson-editor .ace_marker-layer .ace_bracket {
margin: -1px 0 0 -1px;
border: 1px solid rgb(192, 192, 192);
}
.ace-crimson-editor .ace_marker-layer .ace_active_line {
background: rgb(232, 242, 254);
}
.ace-crimson-editor .ace_gutter_active_line {
background-color : #dcdcdc;
}
.ace-crimson-editor .ace_meta.ace_tag {
color:rgb(28, 2, 255);
}
.ace-crimson-editor .ace_marker-layer .ace_selected_word {
background: rgb(250, 250, 255);
border: 1px solid rgb(200, 200, 250);
}
.ace-crimson-editor .ace_string.ace_regex {
color: rgb(192, 0, 192);
}
.ace-crimson-editor .ace_indent-guide {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
}

186
tool/dreamweaver.css Normal file
View file

@ -0,0 +1,186 @@
.ace-dreamweaver .ace_editor {
border: 2px solid rgb(159, 159, 159);
}
.ace-dreamweaver .ace_editor.ace_focus {
border: 2px solid #327fbd;
}
.ace-dreamweaver .ace_gutter {
background: #e8e8e8;
color: #333;
}
.ace-dreamweaver .ace_print_margin {
width: 1px;
background: #e8e8e8;
}
.ace-dreamweaver .ace_fold {
background-color: #757AD8;
}
.ace-dreamweaver .ace_text-layer {
}
.ace-dreamweaver .ace_cursor {
border-left: 2px solid black;
}
.ace-dreamweaver .ace_cursor.ace_overwrite {
border-left: 0px;
border-bottom: 1px solid black;
}
.ace-dreamweaver .ace_line .ace_invisible {
color: rgb(191, 191, 191);
}
.ace-dreamweaver .ace_line .ace_storage,
.ace-dreamweaver .ace_line .ace_keyword {
color: blue;
}
.ace-dreamweaver .ace_line .ace_constant.ace_buildin {
color: rgb(88, 72, 246);
}
.ace-dreamweaver .ace_line .ace_constant.ace_language {
color: rgb(88, 92, 246);
}
.ace-dreamweaver .ace_line .ace_constant.ace_library {
color: rgb(6, 150, 14);
}
.ace-dreamweaver .ace_line .ace_invalid {
background-color: rgb(153, 0, 0);
color: white;
}
.ace-dreamweaver .ace_line .ace_support.ace_function {
color: rgb(60, 76, 114);
}
.ace-dreamweaver .ace_line .ace_support.ace_constant {
color: rgb(6, 150, 14);
}
.ace-dreamweaver .ace_line .ace_support.ace_type,
.ace-dreamweaver .ace_line .ace_support.ace_class {
color: #009;
}
.ace-dreamweaver .ace_line .ace_support.ace_php_tag {
color: #f00;
}
.ace-dreamweaver .ace_line .ace_keyword.ace_operator {
color: rgb(104, 118, 135);
}
.ace-dreamweaver .ace_line .ace_string {
color: #00F;
}
.ace-dreamweaver .ace_line .ace_comment {
color: rgb(76, 136, 107);
}
.ace-dreamweaver .ace_line .ace_comment.ace_doc {
color: rgb(0, 102, 255);
}
.ace-dreamweaver .ace_line .ace_comment.ace_doc.ace_tag {
color: rgb(128, 159, 191);
}
.ace-dreamweaver .ace_line .ace_constant.ace_numeric {
color: rgb(0, 0, 205);
}
.ace-dreamweaver .ace_line .ace_variable {
color: #06F
}
.ace-dreamweaver .ace_line .ace_xml_pe {
color: rgb(104, 104, 91);
}
.ace-dreamweaver .ace_entity.ace_name.ace_function {
color: #00F;
}
.ace-dreamweaver .ace_markup.ace_markupine {
text-decoration:underline;
}
.ace-dreamweaver .ace_markup.ace_heading {
color: rgb(12, 7, 255);
}
.ace-dreamweaver .ace_markup.ace_list {
color:rgb(185, 6, 144);
}
.ace-dreamweaver .ace_marker-layer .ace_selection {
background: rgb(181, 213, 255);
}
.ace-dreamweaver .ace_marker-layer .ace_step {
background: rgb(252, 255, 0);
}
.ace-dreamweaver .ace_marker-layer .ace_stack {
background: rgb(164, 229, 101);
}
.ace-dreamweaver .ace_marker-layer .ace_bracket {
margin: -1px 0 0 -1px;
border: 1px solid rgb(192, 192, 192);
}
.ace-dreamweaver .ace_marker-layer .ace_active_line {
background: rgba(0, 0, 0, 0.07);
}
.ace-dreamweaver .ace_marker-layer .ace_selected_word {
background: rgb(250, 250, 255);
border: 1px solid rgb(200, 200, 250);
}
.ace-dreamweaver .ace_meta.ace_tag {
color:#009;
}
.ace-dreamweaver .ace_meta.ace_tag.ace_anchor {
color:#060;
}
.ace-dreamweaver .ace_meta.ace_tag.ace_form {
color:#F90;
}
.ace-dreamweaver .ace_meta.ace_tag.ace_image {
color:#909;
}
.ace-dreamweaver .ace_meta.ace_tag.ace_script {
color:#900;
}
.ace-dreamweaver .ace_meta.ace_tag.ace_style {
color:#909;
}
.ace-dreamweaver .ace_meta.ace_tag.ace_table {
color:#099;
}
.ace-dreamweaver .ace_string.ace_regex {
color: rgb(255, 0, 0)
}
.ace-dreamweaver .ace_indent-guide {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
}

110
tool/eclipse.css Normal file
View file

@ -0,0 +1,110 @@
.ace-eclipse .ace_editor {
border: 2px solid rgb(159, 159, 159);
}
.ace-eclipse .ace_editor.ace_focus {
border: 2px solid #327fbd;
}
.ace-eclipse .ace_gutter {
background: #ebebeb;
border-right: 1px solid rgb(159, 159, 159);
color: rgb(136, 136, 136);
}
.ace-eclipse .ace_print_margin {
width: 1px;
background: #ebebeb;
}
.ace-eclipse .ace_fold {
background-color: rgb(60, 76, 114);
}
.ace-eclipse .ace_text-layer {
}
.ace-eclipse .ace_cursor {
border-left: 2px solid black;
}
.ace-eclipse .ace_line .ace_storage,
.ace-eclipse .ace_line .ace_keyword,
.ace-eclipse .ace_line .ace_variable {
color: rgb(127, 0, 85);
}
.ace-eclipse .ace_line .ace_constant.ace_buildin {
color: rgb(88, 72, 246);
}
.ace-eclipse .ace_line .ace_constant.ace_library {
color: rgb(6, 150, 14);
}
.ace-eclipse .ace_line .ace_function {
color: rgb(60, 76, 114);
}
.ace-eclipse .ace_line .ace_string {
color: rgb(42, 0, 255);
}
.ace-eclipse .ace_line .ace_comment {
color: rgb(63, 127, 95);
}
.ace-eclipse .ace_line .ace_comment.ace_doc {
color: rgb(63, 95, 191);
}
.ace-eclipse .ace_line .ace_comment.ace_doc.ace_tag {
color: rgb(127, 159, 191);
}
.ace-eclipse .ace_line .ace_constant.ace_numeric {
}
.ace-eclipse .ace_line .ace_tag {
color: rgb(63, 127, 127);
}
.ace-eclipse .ace_line .ace_type {
color: rgb(127, 0, 127);
}
.ace-eclipse .ace_line .ace_xml_pe {
color: rgb(104, 104, 91);
}
.ace-eclipse .ace_marker-layer .ace_selection {
background: rgb(181, 213, 255);
}
.ace-eclipse .ace_marker-layer .ace_bracket {
margin: -1px 0 0 -1px;
border: 1px solid rgb(192, 192, 192);
}
.ace-eclipse .ace_line .ace_meta.ace_tag {
color:rgb(63, 127, 127);
}
.ace-eclipse .ace_entity.ace_other.ace_attribute-name {
color:rgb(127, 0, 127);
}
.ace-eclipse .ace_marker-layer .ace_step {
background: rgb(255, 255, 0);
}
.ace-eclipse .ace_marker-layer .ace_active_line {
background: rgb(232, 242, 254);
}
.ace-eclipse .ace_marker-layer .ace_selected_word {
border: 1px solid rgb(181, 213, 255);
}
.ace-eclipse .ace_indent-guide {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
}

137
tool/github.css Normal file
View file

@ -0,0 +1,137 @@
/* CSS style content from github's default pygments highlighter template.
Cursor and selection styles from textmate.css. */
.ace-github .ace_editor {
color: #333;
background-color: #F8F8F8;
border: 1px solid #CCC;
font: 13px 'Bitstream Vera Sans Mono', Courier, monospace !important;
line-height: 19px !important;
overflow: auto;
padding: 6px 10px;
border-radius: 3px;
position: relative;
margin-bottom: 15px;
}
.ace-github .ace_gutter {
background: #e8e8e8;
color: #AAA;
}
.ace-github .ace_scroller {
background: #fff;
}
.ace-github .ace_keyword {
font-weight: bold;
}
.ace-github .ace_string {
color: #D14;
}
.ace-github .ace_variable.ace_class {
color: teal;
}
.ace-github .ace_constant.ace_numeric {
color: #099;
}
.ace-github .ace_constant.ace_buildin {
color: #0086B3;
}
.ace-github .ace_support.ace_function {
color: #0086B3;
}
.ace-github .ace_comment {
color: #998;
font-style: italic;
}
.ace-github .ace_variable.ace_language {
color: #0086B3;
}
.ace-github .ace_paren {
font-weight: bold;
}
.ace-github .ace_boolean {
font-weight: bold;
}
.ace-github .ace_string.ace_regexp {
color: #009926;
font-weight: normal;
}
.ace-github .ace_variable.ace_instancce {
color: teal;
}
.ace-github .ace_constant.ace_language {
font-weight: bold;
}
.ace-github .ace_text-layer {
}
.ace-github .ace_cursor {
border-left: 2px solid black;
}
.ace-github .ace_cursor.ace_overwrite {
border-left: 0px;
border-bottom: 1px solid black;
}
.ace-github .ace_marker-layer .ace_active_line {
background: rgb(255, 255, 204);
}
.ace-github .ace_marker-layer .ace_selection {
background: rgb(181, 213, 255);
}
.ace-github.multiselect .ace_selection.start {
box-shadow: 0 0 3px 0px white;
border-radius: 2px;
}
/* bold keywords cause cursor issues for some fonts */
/* this disables bold style for editor and keeps for static highlighter */
.ace-github.ace_editor .ace_line > span {
font-weight: normal !important;
}
.ace-github .ace_marker-layer .ace_step {
background: rgb(252, 255, 0);
}
.ace-github .ace_marker-layer .ace_stack {
background: rgb(164, 229, 101);
}
.ace-github .ace_marker-layer .ace_bracket {
margin: -1px 0 0 -1px;
border: 1px solid rgb(192, 192, 192);
}
.ace-github .ace_gutter_active_line{
background-color : rgba(0, 0, 0, 0.07);
}
.ace-github .ace_marker-layer .ace_selected_word {
background: rgb(250, 250, 255);
border: 1px solid rgb(200, 200, 250);
}
.ace-github .ace_print_margin {
width: 1px;
background: #e8e8e8;
}
.ace-github .ace_indent-guide {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
}

View file

@ -69,6 +69,8 @@ var %language%HighlightRules = function() {
this.$rules =
%languageTokens%
%respositoryRules%
};
oop.inherits(%language%HighlightRules, TextHighlightRules);

169
tool/textmate.css Normal file
View file

@ -0,0 +1,169 @@
.ace-tm .ace_editor {
border: 2px solid rgb(159, 159, 159);
}
.ace-tm .ace_editor.ace_focus {
border: 2px solid #327fbd;
}
.ace-tm .ace_gutter {
background: #f0f0f0;
color: #333;
}
.ace-tm .ace_print_margin {
width: 1px;
background: #e8e8e8;
}
.ace-tm .ace_fold {
background-color: #6B72E6;
}
.ace-tm .ace_text-layer {
}
.ace-tm .ace_cursor {
border-left: 2px solid black;
}
.ace-tm .ace_cursor.ace_overwrite {
border-left: 0px;
border-bottom: 1px solid black;
}
.ace-tm .ace_line .ace_invisible {
color: rgb(191, 191, 191);
}
.ace-tm .ace_line .ace_storage,
.ace-tm .ace_line .ace_keyword {
color: blue;
}
.ace-tm .ace_line .ace_constant {
color: rgb(197, 6, 11);
}
.ace-tm .ace_line .ace_constant.ace_buildin {
color: rgb(88, 72, 246);
}
.ace-tm .ace_line .ace_constant.ace_language {
color: rgb(88, 92, 246);
}
.ace-tm .ace_line .ace_constant.ace_library {
color: rgb(6, 150, 14);
}
.ace-tm .ace_line .ace_invalid {
background-color: rgba(255, 0, 0, 0.1);
color: red;
}
.ace-tm .ace_line .ace_support.ace_function {
color: rgb(60, 76, 114);
}
.ace-tm .ace_line .ace_support.ace_constant {
color: rgb(6, 150, 14);
}
.ace-tm .ace_line .ace_support.ace_type,
.ace-tm .ace_line .ace_support.ace_class {
color: rgb(109, 121, 222);
}
.ace-tm .ace_line .ace_keyword.ace_operator {
color: rgb(104, 118, 135);
}
.ace-tm .ace_line .ace_string {
color: rgb(3, 106, 7);
}
.ace-tm .ace_line .ace_comment {
color: rgb(76, 136, 107);
}
.ace-tm .ace_line .ace_comment.ace_doc {
color: rgb(0, 102, 255);
}
.ace-tm .ace_line .ace_comment.ace_doc.ace_tag {
color: rgb(128, 159, 191);
}
.ace-tm .ace_line .ace_constant.ace_numeric {
color: rgb(0, 0, 205);
}
.ace-tm .ace_line .ace_variable {
color: rgb(49, 132, 149);
}
.ace-tm .ace_line .ace_xml_pe {
color: rgb(104, 104, 91);
}
.ace-tm .ace_entity.ace_name.ace_function {
color: #0000A2;
}
.ace-tm .ace_markup.ace_markupine {
text-decoration:underline;
}
.ace-tm .ace_markup.ace_heading {
color: rgb(12, 7, 255);
}
.ace-tm .ace_markup.ace_list {
color:rgb(185, 6, 144);
}
.ace-tm .ace_marker-layer .ace_selection {
background: rgb(181, 213, 255);
}
.ace-tm.multiselect .ace_selection.start {
box-shadow: 0 0 3px 0px white;
border-radius: 2px;
}
.ace-tm .ace_marker-layer .ace_step {
background: rgb(252, 255, 0);
}
.ace-tm .ace_marker-layer .ace_stack {
background: rgb(164, 229, 101);
}
.ace-tm .ace_marker-layer .ace_bracket {
margin: -1px 0 0 -1px;
border: 1px solid rgb(192, 192, 192);
}
.ace-tm .ace_marker-layer .ace_active_line {
background: rgba(0, 0, 0, 0.07);
}
.ace-tm .ace_gutter_active_line {
background-color : #dcdcdc;
}
.ace-tm .ace_marker-layer .ace_selected_word {
background: rgb(250, 250, 255);
border: 1px solid rgb(200, 200, 250);
}
.ace-tm .ace_meta.ace_tag {
color:rgb(0, 22, 142);
}
.ace-tm .ace_string.ace_regex {
color: rgb(255, 0, 0)
}
.ace-tm .ace_indent-guide {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
}

View file

@ -78,7 +78,7 @@ function restoreComments(objStr) {
}
function checkForLookBehind(str) {
var lookbehindRegExp = new RegExp("\\?<[=|!]");
var lookbehindRegExp = new RegExp("\\?<[=|!]", "g");
return lookbehindRegExp.test(str) ? str + " // ERROR: This contains a lookbehind, which JS does not support :(" : str;
}
@ -228,23 +228,33 @@ function convertLanguage(name) {
console.log("Converting " + name + " to " + languageHighlightFile);
if (devMode)
if (devMode) {
console.log(util.inspect(language.patterns, false, 4));
console.log(util.inspect(language.repository, false, 4));
}
var languageMode = fillTemplate(modeTemplate, {
language: languageNameSanitized,
languageHighlightFilename: languageHighlightFilename
});
var patterns = extractPatterns(language.patterns);
var repository = {};
if (language.repository) {
for (var r in language.repository) {
repository[r] = language.repository[r];
}
repository = restoreComments(JSON.stringify(repository, null, " "));
}
var languageHighlightRules = fillTemplate(modeHighlightTemplate, {
language: languageNameSanitized,
languageTokens: patterns,
respositoryRules: "/*** START REPOSITORY RULES " + repository + "END REPOSITORY RULES ***/",
uuid: language.uuid
});
if (devMode) {
console.log("Not writing, 'cause we're in dev mode, baby.");
}