~ubuntu-branches/ubuntu/trusty/yelp-xsl/trusty

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Michael Terry
  • Date: 2011-07-09 10:02:21 UTC
  • mto: (11.1.1 experimental) (1.3.1)
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: james.westby@ubuntu.com-20110709100221-27hsncxrd63leyx4
Tags: upstream-3.1.2
ImportĀ upstreamĀ versionĀ 3.1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// brush: "javascript" aliases: ["js", "actionscript"]
2
2
 
3
 
//      This file is part of the "jQuery.Syntax" project, and is licensed under the GNU AGPLv3.
4
 
//      Copyright 2010 Samuel Williams. All rights reserved.
 
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
5
//      See <jquery.syntax.js> for licensing details.
6
6
 
7
7
Syntax.register('javascript', function(brush) {
8
 
        var keywords = ["break", "case", "catch", "continue", "default", "delete", "do", "else", "for", "if", "in", "instanceof", "new", "return", "super", "switch", "throw", "true", "try", "typeof", "var", "while", "with", "prototype"];
 
8
        var keywords = ["function", "break", "case", "catch", "continue", "default", "delete", "do", "else", "for", "if", "in", "instanceof", "new", "return", "super", "switch", "throw", "true", "try", "typeof", "var", "while", "with", "prototype"];
9
9
        
10
10
        var operators = ["+", "*", "/", "-", "&", "|", "~", "!", "%", "<", "=", ">"];
11
 
        var values = ["function", "this", "true", "false", "null"];
12
 
                
 
11
        var values = ["this", "true", "false", "null"];
 
12
        
13
13
        brush.push(values, {klass: 'constant'});
14
14
        brush.push(keywords, {klass: 'keyword'});
15
15
        brush.push(operators, {klass: 'operator'});
16
16
        
 
17
        // Regular expressions
 
18
        brush.push(Syntax.lib.perlStyleRegularExpressions);
 
19
        
17
20
        // Camel Case Types
18
21
        brush.push(Syntax.lib.camelCaseType);
19
22