~ubuntu-branches/ubuntu/utopic/python-chaco/utopic

« back to all changes in this revision

Viewing changes to docs/scipy_tutorial/Scripts/shBrushRuby.js

  • Committer: Package Import Robot
  • Author(s): Andrew Starr-Bochicchio
  • Date: 2014-06-01 17:04:08 UTC
  • mfrom: (7.2.5 sid)
  • Revision ID: package-import@ubuntu.com-20140601170408-m86xvdjd83a4qon0
Tags: 4.4.1-1ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
 - Let the binary-predeb target work on the usr/lib/python* directory
   as we don't have usr/share/pyshared anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Ruby 1.8.4 syntax contributed by Erik Peterson */
2
 
dp.sh.Brushes.Ruby = function()
3
 
{
4
 
  var keywords =        'alias and BEGIN begin break case class def define_method defined do each else elsif ' +
5
 
                                        'END end ensure false for if in module new next nil not or raise redo rescue retry return ' +
6
 
                                        'self super then throw true undef unless until when while yield';
7
 
 
8
 
  var builtins =        'Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload ' +
9
 
                                        'Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol ' +
10
 
                                        'ThreadGroup Thread Time TrueClass'
11
 
 
12
 
        this.regexList = [
13
 
                { regex: dp.sh.RegexLib.SingleLinePerlComments,                 css: 'comment' },       // one line comments
14
 
                { regex: dp.sh.RegexLib.DoubleQuotedString,                             css: 'string' },        // double quoted strings
15
 
                { regex: dp.sh.RegexLib.SingleQuotedString,                             css: 'string' },        // single quoted strings
16
 
                { regex: new RegExp(':[a-z][A-Za-z0-9_]*', 'g'),                css: 'symbol' },        // symbols
17
 
                { regex: new RegExp('[\\$|@|@@]\\w+', 'g'),                             css: 'variable' },      // $global, @instance, and @@class variables
18
 
                { regex: new RegExp(this.GetKeywords(keywords), 'gm'),  css: 'keyword' },       // keywords
19
 
                { regex: new RegExp(this.GetKeywords(builtins), 'gm'),  css: 'builtin' }        // builtins
20
 
                ];
21
 
 
22
 
        this.CssClass = 'dp-rb';
23
 
}
24
 
 
25
 
dp.sh.Brushes.Ruby.prototype    = new dp.sh.Highlighter();
26
 
dp.sh.Brushes.Ruby.Aliases      = ['ruby', 'rails'];