~ubuntu-branches/ubuntu/precise/python-chaco/precise

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2008-12-29 02:34:05 UTC
  • Revision ID: james.westby@ubuntu.com-20081229023405-x7i4kp9mdxzmdnvu
Tags: upstream-3.0.1
ImportĀ upstreamĀ versionĀ 3.0.1

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'];