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

« back to all changes in this revision

Viewing changes to docs/scipy_tutorial/Scripts/shBrushDelphi.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
 
/* Delphi brush is contributed by Eddie Shipman */
2
 
dp.sh.Brushes.Delphi = function()
3
 
{
4
 
        var keywords =  'abs addr and ansichar ansistring array as asm begin boolean byte cardinal ' +
5
 
                                        'case char class comp const constructor currency destructor div do double ' +
6
 
                                        'downto else end except exports extended false file finalization finally ' +
7
 
                                        'for function goto if implementation in inherited int64 initialization ' +
8
 
                                        'integer interface is label library longint longword mod nil not object ' +
9
 
                                        'of on or packed pansichar pansistring pchar pcurrency pdatetime pextended ' + 
10
 
                                        'pint64 pointer private procedure program property pshortstring pstring ' + 
11
 
                                        'pvariant pwidechar pwidestring protected public published raise real real48 ' +
12
 
                                        'record repeat set shl shortint shortstring shr single smallint string then ' +
13
 
                                        'threadvar to true try type unit until uses val var varirnt while widechar ' +
14
 
                                        'widestring with word write writeln xor';
15
 
 
16
 
        this.regexList = [
17
 
                { regex: new RegExp('\\(\\*[\\s\\S]*?\\*\\)', 'gm'),            css: 'comment' },                       // multiline comments (* *)
18
 
                { regex: new RegExp('{(?!\\$)[\\s\\S]*?}', 'gm'),                       css: 'comment' },                       // multiline comments { }
19
 
                { regex: dp.sh.RegexLib.SingleLineCComments,                            css: 'comment' },                       // one line
20
 
                { regex: dp.sh.RegexLib.SingleQuotedString,                                     css: 'string' },                        // strings
21
 
                { regex: new RegExp('\\{\\$[a-zA-Z]+ .+\\}', 'g'),                      css: 'directive' },                     // Compiler Directives and Region tags
22
 
                { regex: new RegExp('\\b[\\d\\.]+\\b', 'g'),                            css: 'number' },                        // numbers 12345
23
 
                { regex: new RegExp('\\$[a-zA-Z0-9]+\\b', 'g'),                         css: 'number' },                        // numbers $F5D3
24
 
                { regex: new RegExp(this.GetKeywords(keywords), 'gm'),          css: 'keyword' }                        // keyword
25
 
                ];
26
 
 
27
 
        this.CssClass = 'dp-delphi';
28
 
}
29
 
 
30
 
dp.sh.Brushes.Delphi.prototype  = new dp.sh.Highlighter();
31
 
dp.sh.Brushes.Delphi.Aliases    = ['delphi', 'pascal'];