| 1 | # |
| 2 | # ActionScript syntax highlighting |
| 3 | # for MC Editor/CoolEdit |
| 4 | # |
| 5 | # Author: Oleg Kosenkov <oleg@kosenkov.ca> |
| 6 | # Based on js.syntax |
| 7 | # |
| 8 | # 2011-12-27 Oleg Kosenkov <oleg@kosenkov.ca> |
| 9 | # * Initial public release. |
| 10 | # |
| 11 | |
| 12 | context default |
| 13 | |
| 14 | #========================= |
| 15 | # Keywords |
| 16 | keyword whole arguments yellow |
| 17 | keyword whole break yellow |
| 18 | keyword whole caller yellow |
| 19 | keyword whole case yellow |
| 20 | keyword whole catch yellow |
| 21 | keyword whole constructor yellow |
| 22 | keyword whole continue yellow |
| 23 | keyword whole else yellow |
| 24 | keyword whole default yellow |
| 25 | keyword whole delete yellow |
| 26 | keyword whole for yellow |
| 27 | keyword whole function yellow |
| 28 | keyword whole private yellow |
| 29 | keyword whole public yellow |
| 30 | keyword whole internal yellow |
| 31 | keyword whole protected yellow |
| 32 | keyword whole native yellow |
| 33 | keyword whole static yellow |
| 34 | keyword whole if yellow |
| 35 | keyword whole in yellow |
| 36 | keyword whole instanceof yellow |
| 37 | keyword whole new yellow |
| 38 | keyword whole prototype yellow |
| 39 | keyword whole override yellow |
| 40 | keyword whole return yellow |
| 41 | keyword whole switch yellow |
| 42 | keyword whole this yellow |
| 43 | keyword whole throw yellow |
| 44 | keyword whole try yellow |
| 45 | keyword whole typeof yellow |
| 46 | keyword whole var yellow |
| 47 | keyword whole while yellow |
| 48 | keyword whole with yellow |
| 49 | keyword whole import yellow |
| 50 | keyword whole package yellow |
| 51 | keyword whole class yellow |
| 52 | keyword whole final yellow |
| 53 | keyword whole const yellow |
| 54 | keyword whole set yellow |
| 55 | keyword whole get yellow |
| 56 | keyword whole dynamic yellow |
| 57 | keyword whole label yellow |
| 58 | keyword whole super yellow |
| 59 | keyword whole extends yellow |
| 60 | keyword whole include yellow |
| 61 | keyword whole namespace yellow |
| 62 | keyword whole interface yellow |
| 63 | keyword whole this yellow |
| 64 | |
| 65 | |
| 66 | #========================= |
| 67 | # Objects |
| 68 | keyword whole ActiveXObject yellow |
| 69 | keyword whole Array yellow |
| 70 | keyword whole Boolean yellow |
| 71 | keyword whole Date yellow |
| 72 | keyword whole Dictionary yellow |
| 73 | keyword whole Enumerator yellow |
| 74 | keyword whole FileSystemObject yellow |
| 75 | keyword whole Function yellow |
| 76 | keyword whole Global yellow |
| 77 | keyword whole Image yellow |
| 78 | keyword whole Math yellow |
| 79 | keyword whole Number yellow |
| 80 | keyword whole Object yellow |
| 81 | keyword whole TextStream yellow |
| 82 | keyword whole RegExp yellow |
| 83 | keyword whole VBArray yellow |
| 84 | keyword whole String yellow |
| 85 | keyword whole void yellow |
| 86 | keyword whole int yellow |
| 87 | |
| 88 | #========================= |
| 89 | # Most common functions |
| 90 | keyword whole alert yellow |
| 91 | keyword whole escape yellow |
| 92 | keyword whole eval yellow |
| 93 | keyword whole indexOf yellow |
| 94 | keyword whole isNaN yellow |
| 95 | keyword whole toString yellow |
| 96 | keyword whole unescape yellow |
| 97 | keyword whole valueOf yellow |
| 98 | |
| 99 | #========================= |
| 100 | # Constants |
| 101 | keyword whole false brightgreen |
| 102 | keyword whole null brightgreen |
| 103 | keyword whole true brightgreen |
| 104 | keyword whole undefined yellow |
| 105 | |
| 106 | #========================= |
| 107 | # Comments |
| 108 | keyword /\* brown |
| 109 | keyword \*/ brown |
| 110 | keyword // brown |
| 111 | |
| 112 | #========================= |
| 113 | # Numbers |
| 114 | wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_. |
| 115 | |
| 116 | keyword whole 0\{xX\}\{0123456789abcdefABCDEF\}\[0123456789abcdefABCDEF\] brightgreen |
| 117 | keyword whole \{0123456789\}\[0123456789\] brightgreen |
| 118 | keyword whole \[0123456789\]\.\{0123456789\}\[0123456789\] brightgreen |
| 119 | keyword whole \{0123456789\}\[0123456789\]\.\[0123456789\] brightgreen |
| 120 | keyword whole \{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen |
| 121 | keyword whole \{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen |
| 122 | keyword whole \{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen |
| 123 | keyword whole \{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen |
| 124 | |
| 125 | #========================= |
| 126 | # Special symbols |
| 127 | keyword \. yellow |
| 128 | keyword \* yellow |
| 129 | keyword \+ yellow |
| 130 | keyword - yellow |
| 131 | keyword / yellow |
| 132 | keyword % yellow |
| 133 | keyword = yellow |
| 134 | keyword ! yellow |
| 135 | keyword & yellow |
| 136 | keyword | yellow |
| 137 | keyword ^ yellow |
| 138 | keyword ~ yellow |
| 139 | keyword > yellow |
| 140 | keyword < yellow |
| 141 | |
| 142 | #========================= |
| 143 | # Separators |
| 144 | keyword { brightcyan |
| 145 | keyword } brightcyan |
| 146 | keyword ( brightcyan |
| 147 | keyword ) brightcyan |
| 148 | keyword [ brightcyan |
| 149 | keyword ] brightcyan |
| 150 | keyword , brightcyan |
| 151 | keyword ? brightcyan |
| 152 | keyword : brightcyan |
| 153 | keyword ; brightmagenta |
| 154 | |
| 155 | |
| 156 | #============================= |
| 157 | # Comments |
| 158 | |
| 159 | context exclusive /\* \*/ brown |
| 160 | spellcheck |
| 161 | keyword whole BUG brightred |
| 162 | keyword whole FixMe brightred |
| 163 | keyword whole FIXME brightred |
| 164 | keyword whole Note brightred |
| 165 | keyword whole NOTE brightred |
| 166 | keyword whole ToDo brightred |
| 167 | keyword whole TODO brightred |
| 168 | keyword !!\[!\] brightred |
| 169 | keyword ??\[?\] brightred |
| 170 | |
| 171 | |
| 172 | context exclusive // \n brown |
| 173 | spellcheck |
| 174 | keyword whole BUG brightred |
| 175 | keyword whole FixMe brightred |
| 176 | keyword whole FIXME brightred |
| 177 | keyword whole Note brightred |
| 178 | keyword whole NOTE brightred |
| 179 | keyword whole ToDo brightred |
| 180 | keyword whole TODO brightred |
| 181 | keyword !!\[!\] brightred |
| 182 | keyword ??\[?\] brightred |
| 183 | |
| 184 | |
| 185 | #============================= |
| 186 | # Strings |
| 187 | |
| 188 | context " " green |
| 189 | spellcheck |
| 190 | keyword \\\{\\'"abtnvfr\} brightgreen |
| 191 | keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen |
| 192 | |
| 193 | keyword ' brightgreen |
| 194 | |
| 195 | context ' ' green |
| 196 | spellcheck |
| 197 | keyword \\\{\\'"abtnvfr\} brightgreen |
| 198 | keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen |
| 199 | |
| 200 | keyword " brightgreen |