| 1 |
/** |
| 2 |
* Ruby syntax v 1.0 |
| 3 |
* |
| 4 |
* v1.0 by Patrice De Saint Steban (2007/01/03) |
| 5 |
* |
| 6 |
**/ |
| 7 |
editAreaLoader.load_syntax["ruby"] = { |
| 8 |
'DISPLAY_NAME' : 'Ruby' |
| 9 |
,'COMMENT_SINGLE' : {1 : '#'} |
| 10 |
,'COMMENT_MULTI' : {} |
| 11 |
,'QUOTEMARKS' : {1: "'", 2: '"'} |
| 12 |
,'KEYWORD_CASE_SENSITIVE' : true |
| 13 |
,'KEYWORDS' : { |
| 14 |
'reserved' : [ |
| 15 |
'alias', 'and', 'BEGIN', 'begin', 'break', 'case', 'class', 'def', 'defined', 'do', 'else', |
| 16 |
'elsif', 'END', 'end', 'ensure', 'false', 'for', 'if', |
| 17 |
'in', 'module', 'next', 'not', 'or', 'redo', 'rescue', 'retry', |
| 18 |
'return', 'self', 'super', 'then', 'true', 'undef', 'unless', 'until', 'when', 'while', 'yield' |
| 19 |
] |
| 20 |
} |
| 21 |
,'OPERATORS' :[ |
| 22 |
'+', '-', '/', '*', '=', '<', '>', '%', '!', '&', ';', '?', '`', ':', ',' |
| 23 |
] |
| 24 |
,'DELIMITERS' :[ |
| 25 |
'(', ')', '[', ']', '{', '}' |
| 26 |
] |
| 27 |
,'REGEXPS' : { |
| 28 |
'constants' : { |
| 29 |
'search' : '()([A-Z]\\w*)()' |
| 30 |
,'class' : 'constants' |
| 31 |
,'modifiers' : 'g' |
| 32 |
,'execute' : 'before' |
| 33 |
} |
| 34 |
,'variables' : { |
| 35 |
'search' : '()([\$\@\%]+\\w+)()' |
| 36 |
,'class' : 'variables' |
| 37 |
,'modifiers' : 'g' |
| 38 |
,'execute' : 'before' |
| 39 |
} |
| 40 |
,'numbers' : { |
| 41 |
'search' : '()(-?[0-9]+)()' |
| 42 |
,'class' : 'numbers' |
| 43 |
,'modifiers' : 'g' |
| 44 |
,'execute' : 'before' |
| 45 |
} |
| 46 |
,'symbols' : { |
| 47 |
'search' : '()(:\\w+)()' |
| 48 |
,'class' : 'symbols' |
| 49 |
,'modifiers' : 'g' |
| 50 |
,'execute' : 'before' |
| 51 |
} |
| 52 |
} |
| 53 |
,'STYLES' : { |
| 54 |
'COMMENTS': 'color: #AAAAAA;' |
| 55 |
,'QUOTESMARKS': 'color: #660066;' |
| 56 |
,'KEYWORDS' : { |
| 57 |
'reserved' : 'font-weight: bold; color: #0000FF;' |
| 58 |
} |
| 59 |
,'OPERATORS' : 'color: #993300;' |
| 60 |
,'DELIMITERS' : 'color: #993300;' |
| 61 |
,'REGEXPS' : { |
| 62 |
'variables' : 'color: #E0BD54;' |
| 63 |
,'numbers' : 'color: green;' |
| 64 |
,'constants' : 'color: #00AA00;' |
| 65 |
,'symbols' : 'color: #879EFA;' |
| 66 |
} |
| 67 |
} |
| 68 |
}; |
| 69 |
|