1<?php
2/*************************************************************************************
3 * coffeescript.php
4 * ----------
5 * Author: Trevor Burnham (trevorburnham@gmail.com)
6 * Copyright: (c) 2010 Trevor Burnham (http://iterative.ly)
7 * Release Version: 1.0.9.1
8 * Date Started: 2010/06/08
9 *
10 * CoffeeScript language file for GeSHi.
11 *
12 * CHANGES
13 * -------
14 * 2010/06/08 (1.0.8.9)
15 *  -  First Release
16 *
17 *************************************************************************************
18 *
19 *     This file is part of GeSHi.
20 *
21 *   GeSHi is free software; you can redistribute it and/or modify
22 *   it under the terms of the GNU General Public License as published by
23 *   the Free Software Foundation; either version 2 of the License, or
24 *   (at your option) any later version.
25 *
26 *   GeSHi is distributed in the hope that it will be useful,
27 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
28 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
29 *   GNU General Public License for more details.
30 *
31 *   You should have received a copy of the GNU General Public License
32 *   along with GeSHi; if not, write to the Free Software
33 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
34 *
35 ************************************************************************************/
36
37$language_data = array (
38    'LANG_NAME' => 'CoffeeScript',
39    'COMMENT_SINGLE' => array(1 => '#'),
40    'COMMENT_MULTI' => array('###' => '###'),
41    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
42    //Longest quotemarks ALWAYS first
43    'QUOTEMARKS' => array('"""', "'''", '"', "'"),
44    'ESCAPE_CHAR' => '\\',
45    'KEYWORDS' => array(
46
47        /*
48        ** Set 1: control keywords
49        */
50        1 => array(
51            'break', 'by', 'catch', 'continue', 'else', 'finally', 'for', 'in', 'of', 'if',
52            'return', 'switch', 'then', 'throw', 'try', 'unless', 'when', 'while', 'until'
53            ),
54
55        /*
56        ** Set 2: logic keywords
57        */
58        2 => array(
59            'and', 'or', 'is', 'isnt', 'not'
60            ),
61
62        /*
63        ** Set 3: other keywords
64        */
65        3 => array(
66            'instanceof', 'new', 'delete', 'typeof',
67            'class', 'super', 'this', 'extends'
68            ),
69
70        /*
71        ** Set 4: constants
72        */
73        4 => array(
74            'true', 'false', 'on', 'off', 'yes', 'no',
75            'Infinity', 'NaN', 'undefined', 'null'
76            )
77        ),
78    'SYMBOLS' => array(
79            '(', ')', '[', ']', '{', '}', '*', '&', '|', '%', '!', ',', ';', '<', '>', '?', '`',
80            '+', '-', '*', '/', '->', '=>', '<<', '>>', '@', ':', '^'
81        ),
82    'CASE_SENSITIVE' => array(
83        GESHI_COMMENTS => false,
84        1 => true,
85        2 => true,
86        3 => true,
87        4 => true
88        ),
89    'STYLES' => array(
90        'KEYWORDS' => array(
91            1 => 'color: #ff7700;font-weight:bold;',
92            2 => 'color: #008000;',
93            3 => 'color: #dc143c;',
94            4 => 'color: #0000cd;'
95            ),
96        'COMMENTS' => array(
97            1 => 'color: #808080; font-style: italic;',
98            'MULTI' => 'color: #808080; font-style: italic;'
99            ),
100        'ESCAPE_CHAR' => array(
101            0 => 'color: #000099; font-weight: bold;'
102            ),
103        'BRACKETS' => array(
104            0 => 'color: black;'
105            ),
106        'STRINGS' => array(
107            0 => 'color: #483d8b;'
108            ),
109        'NUMBERS' => array(
110            0 => 'color: #ff4500;'
111            ),
112        'METHODS' => array(
113            1 => 'color: black;'
114            ),
115        'SYMBOLS' => array(
116            0 => 'color: #66cc66;'
117            ),
118        'REGEXPS' => array(
119            ),
120        'SCRIPT' => array(
121            )
122        ),
123    'URLS' => array(
124        1 => '',
125        2 => '',
126        3 => '',
127        4 => ''
128        ),
129    'OOLANG' => true,
130    'OBJECT_SPLITTERS' => array(
131        1 => '.'
132        ),
133    'REGEXPS' => array(
134        ),
135    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
136    'SCRIPT_DELIMITERS' => array(
137        0 => array(
138            '<script type="text/coffeescript">' => '</script>'
139            )
140        ),
141    'HIGHLIGHT_STRICT_BLOCK' => array(
142        0 => true
143        )
144);
145