~ubuntu-branches/ubuntu/quantal/yelp-xsl/quantal

« back to all changes in this revision

Viewing changes to js/jquery.syntax.brush.io.js

  • Committer: Bazaar Package Importer
  • Author(s): Michael Terry
  • Date: 2011-07-09 10:02:21 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20110709100221-5ys7oh9pzgyaaoo4
Tags: 3.1.2-0ubuntu1
* New upstream release.
* debian/control.in:
  - Build-Depend on itstool
  - Point at Ubuntu's branch
* debian/watch:
  - Fix URL

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// brush: "io" aliases: []
 
2
 
 
3
//      This file is part of the "jQuery.Syntax" project, and is distributed under the MIT License.
 
4
//      Copyright (c) 2011 Samuel G. D. Williams. <http://www.oriontransfer.co.nz>
 
5
//      See <jquery.syntax.js> for licensing details.
 
6
 
 
7
Syntax.register('io', function(brush) {
 
8
        brush.push(Syntax.lib.cStyleFunction);
 
9
        
 
10
        var keywords = ["return"];
 
11
        
 
12
        var operators = ["::=", ":=", "or", "and", "@", "+", "*", "/", "-", "&", "|", "~", "!", "%", "<", "=", ">", "[", "]", "new", "delete"];
 
13
        
 
14
        brush.push(keywords, {klass: 'keywords'});
 
15
        brush.push(operators, {klass: 'operator'});
 
16
        
 
17
        // Extract space delimited method invocations
 
18
        brush.push({
 
19
                pattern: /\b([ \t]+([a-z]+))/gi,
 
20
                matches: Syntax.extractMatches({index: 2, klass: 'function'})
 
21
        });
 
22
        
 
23
        brush.push({
 
24
                pattern: /\)([ \t]+([a-z]+))/gi,
 
25
                matches: Syntax.extractMatches({index: 2, klass: 'function'})
 
26
        });
 
27
        
 
28
        // Objective-C classes
 
29
        brush.push(Syntax.lib.camelCaseType);
 
30
        
 
31
        brush.push(Syntax.lib.perlStyleComment);
 
32
        brush.push(Syntax.lib.cStyleComment);
 
33
        brush.push(Syntax.lib.cppStyleComment);
 
34
        brush.push(Syntax.lib.webLink);
 
35
        
 
36
        // Strings
 
37
        brush.push(Syntax.lib.singleQuotedString);
 
38
        brush.push(Syntax.lib.doubleQuotedString);
 
39
        brush.push(Syntax.lib.stringEscape);
 
40
        
 
41
        // Numbers
 
42
        brush.push(Syntax.lib.decimalNumber);
 
43
        brush.push(Syntax.lib.hexNumber);
 
44
});
 
45