2002-09-16 20:57:18 +04:00
|
|
|
#
|
|
|
|
# JavaScript syntax highlighting
|
|
|
|
# for MC Editor/CoolEdit
|
|
|
|
#
|
|
|
|
# Author: Vlad Romanenko <VladRomanenko@ukr.net>
|
|
|
|
# Based on c.syntax
|
|
|
|
#
|
|
|
|
# TODO:
|
|
|
|
# Highlight JS regexpressions /../
|
|
|
|
# More built-in functions
|
|
|
|
#
|
2002-09-18 02:43:32 +04:00
|
|
|
# 2002-09-17 Vlad Romanenko <VladRomanenko@ukr.net>
|
2010-03-05 21:37:48 +03:00
|
|
|
# * More C and Java consistency by Pavel Roskin <proski@gnu.org>.
|
|
|
|
# * Advanced number highlighting.
|
2002-09-18 02:43:32 +04:00
|
|
|
#
|
2002-09-16 20:57:18 +04:00
|
|
|
# 2002-09-16 Vlad Romanenko <VladRomanenko@ukr.net>
|
2010-03-05 21:37:48 +03:00
|
|
|
# * Initial public release.
|
2002-09-16 20:57:18 +04:00
|
|
|
#
|
|
|
|
|
|
|
|
context default
|
|
|
|
|
2010-03-05 21:37:48 +03:00
|
|
|
#=========================
|
|
|
|
# Keywords
|
2010-04-04 20:24:13 +04:00
|
|
|
keyword whole arguments yellow
|
|
|
|
keyword whole break yellow
|
|
|
|
keyword whole caller yellow
|
|
|
|
keyword whole case yellow
|
|
|
|
keyword whole catch yellow
|
2017-03-16 13:42:36 +03:00
|
|
|
keyword whole class yellow
|
|
|
|
keyword whole const yellow
|
2010-04-04 20:24:13 +04:00
|
|
|
keyword whole constructor yellow
|
|
|
|
keyword whole continue yellow
|
|
|
|
keyword whole else yellow
|
2017-03-16 13:42:36 +03:00
|
|
|
keyword whole extends yellow
|
|
|
|
keyword whole export yellow
|
2010-04-04 20:24:13 +04:00
|
|
|
keyword whole default yellow
|
|
|
|
keyword whole delete yellow
|
|
|
|
keyword whole for yellow
|
|
|
|
keyword whole function yellow
|
|
|
|
keyword whole if yellow
|
2017-03-16 13:42:36 +03:00
|
|
|
keyword whole import yellow
|
2010-04-04 20:24:13 +04:00
|
|
|
keyword whole in yellow
|
|
|
|
keyword whole instanceof yellow
|
2017-03-16 13:42:36 +03:00
|
|
|
keyword whole let yellow
|
2010-04-04 20:24:13 +04:00
|
|
|
keyword whole new yellow
|
2017-03-16 13:42:36 +03:00
|
|
|
keyword whole of yellow
|
2010-04-04 20:24:13 +04:00
|
|
|
keyword whole prototype yellow
|
|
|
|
keyword whole return yellow
|
|
|
|
keyword whole switch yellow
|
|
|
|
keyword whole this yellow
|
|
|
|
keyword whole throw yellow
|
|
|
|
keyword whole try yellow
|
|
|
|
keyword whole typeof yellow
|
|
|
|
keyword whole var yellow
|
|
|
|
keyword whole while yellow
|
|
|
|
keyword whole with yellow
|
2017-03-16 13:42:36 +03:00
|
|
|
keyword whole yield yellow
|
2010-03-05 21:37:48 +03:00
|
|
|
|
|
|
|
#=========================
|
|
|
|
# Objects
|
2010-04-04 20:24:13 +04:00
|
|
|
keyword whole ActiveXObject yellow
|
|
|
|
keyword whole Array yellow
|
|
|
|
keyword whole Boolean yellow
|
|
|
|
keyword whole Date yellow
|
|
|
|
keyword whole Dictionary yellow
|
|
|
|
keyword whole Enumerator yellow
|
|
|
|
keyword whole FileSystemObject yellow
|
|
|
|
keyword whole Function yellow
|
|
|
|
keyword whole Global yellow
|
|
|
|
keyword whole Image yellow
|
|
|
|
keyword whole Math yellow
|
2017-03-16 13:42:36 +03:00
|
|
|
keyword whole Map yellow
|
2010-04-04 20:24:13 +04:00
|
|
|
keyword whole Number yellow
|
|
|
|
keyword whole Object yellow
|
2017-03-16 13:42:36 +03:00
|
|
|
keyword whole Promise yellow
|
|
|
|
keyword whole Proxy yellow
|
|
|
|
keyword whole Reflect yellow
|
|
|
|
keyword whole Set yellow
|
|
|
|
keyword whole Symbol yellow
|
2010-04-04 20:24:13 +04:00
|
|
|
keyword whole TextStream yellow
|
|
|
|
keyword whole RegExp yellow
|
|
|
|
keyword whole VBArray yellow
|
2017-03-16 13:42:36 +03:00
|
|
|
keyword whole WeakMap yellow
|
|
|
|
keyword whole WeakSet yellow
|
2010-03-05 21:37:48 +03:00
|
|
|
|
|
|
|
#=========================
|
|
|
|
# Most common functions
|
2010-04-04 20:24:13 +04:00
|
|
|
keyword whole alert yellow
|
|
|
|
keyword whole escape yellow
|
|
|
|
keyword whole eval yellow
|
|
|
|
keyword whole indexOf yellow
|
|
|
|
keyword whole isNaN yellow
|
|
|
|
keyword whole toString yellow
|
|
|
|
keyword whole unescape yellow
|
|
|
|
keyword whole valueOf yellow
|
2010-03-05 21:37:48 +03:00
|
|
|
|
|
|
|
#=========================
|
|
|
|
# Constants
|
2010-04-04 20:24:13 +04:00
|
|
|
keyword whole false brightgreen
|
|
|
|
keyword whole null brightgreen
|
|
|
|
keyword whole true brightgreen
|
|
|
|
keyword whole undefined yellow
|
2010-03-05 21:37:48 +03:00
|
|
|
|
|
|
|
#=========================
|
|
|
|
# Comments
|
2010-04-04 20:24:13 +04:00
|
|
|
keyword /\* brown
|
|
|
|
keyword \*/ brown
|
|
|
|
keyword // brown
|
2010-03-05 21:37:48 +03:00
|
|
|
|
|
|
|
#=========================
|
|
|
|
# Numbers
|
|
|
|
wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.
|
|
|
|
|
2010-04-04 20:24:13 +04:00
|
|
|
keyword whole 0\{xX\}\{0123456789abcdefABCDEF\}\[0123456789abcdefABCDEF\] brightgreen
|
|
|
|
keyword whole \{0123456789\}\[0123456789\] brightgreen
|
|
|
|
keyword whole \[0123456789\]\.\{0123456789\}\[0123456789\] brightgreen
|
|
|
|
keyword whole \{0123456789\}\[0123456789\]\.\[0123456789\] brightgreen
|
|
|
|
keyword whole \{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen
|
|
|
|
keyword whole \{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen
|
|
|
|
keyword whole \{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen
|
|
|
|
keyword whole \{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen
|
2010-03-05 21:37:48 +03:00
|
|
|
|
|
|
|
#=========================
|
|
|
|
# Special symbols
|
2017-03-16 13:42:36 +03:00
|
|
|
keyword => brightcyan
|
2010-04-04 20:24:13 +04:00
|
|
|
keyword \. yellow
|
|
|
|
keyword \* yellow
|
|
|
|
keyword \+ yellow
|
|
|
|
keyword - yellow
|
|
|
|
keyword / yellow
|
|
|
|
keyword % yellow
|
|
|
|
keyword = yellow
|
|
|
|
keyword ! yellow
|
|
|
|
keyword & yellow
|
|
|
|
keyword | yellow
|
|
|
|
keyword ^ yellow
|
|
|
|
keyword ~ yellow
|
|
|
|
keyword > yellow
|
|
|
|
keyword < yellow
|
2010-03-05 21:37:48 +03:00
|
|
|
|
|
|
|
#=========================
|
|
|
|
# Separators
|
2010-04-04 20:24:13 +04:00
|
|
|
keyword { brightcyan
|
|
|
|
keyword } brightcyan
|
|
|
|
keyword ( brightcyan
|
|
|
|
keyword ) brightcyan
|
|
|
|
keyword [ brightcyan
|
|
|
|
keyword ] brightcyan
|
|
|
|
keyword , brightcyan
|
|
|
|
keyword ? brightcyan
|
|
|
|
keyword : brightcyan
|
|
|
|
keyword ; brightmagenta
|
2002-09-16 20:57:18 +04:00
|
|
|
|
|
|
|
|
|
|
|
#=============================
|
|
|
|
# Comments
|
|
|
|
|
2002-09-30 00:22:23 +04:00
|
|
|
context exclusive /\* \*/ brown
|
2010-03-05 21:37:48 +03:00
|
|
|
spellcheck
|
2010-04-04 20:24:13 +04:00
|
|
|
keyword whole BUG brightred
|
|
|
|
keyword whole FixMe brightred
|
|
|
|
keyword whole FIXME brightred
|
|
|
|
keyword whole Note brightred
|
|
|
|
keyword whole NOTE brightred
|
|
|
|
keyword whole ToDo brightred
|
|
|
|
keyword whole TODO brightred
|
|
|
|
keyword !!\[!\] brightred
|
|
|
|
keyword ??\[?\] brightred
|
2002-09-30 00:22:23 +04:00
|
|
|
|
|
|
|
|
|
|
|
context exclusive // \n brown
|
2010-03-05 21:37:48 +03:00
|
|
|
spellcheck
|
2010-04-04 20:24:13 +04:00
|
|
|
keyword whole BUG brightred
|
|
|
|
keyword whole FixMe brightred
|
|
|
|
keyword whole FIXME brightred
|
|
|
|
keyword whole Note brightred
|
|
|
|
keyword whole NOTE brightred
|
|
|
|
keyword whole ToDo brightred
|
|
|
|
keyword whole TODO brightred
|
|
|
|
keyword !!\[!\] brightred
|
|
|
|
keyword ??\[?\] brightred
|
2002-09-16 20:57:18 +04:00
|
|
|
|
|
|
|
|
|
|
|
#=============================
|
|
|
|
# Strings
|
|
|
|
|
2002-09-30 00:22:23 +04:00
|
|
|
context " " green
|
2010-03-05 21:37:48 +03:00
|
|
|
spellcheck
|
2010-04-04 20:24:13 +04:00
|
|
|
keyword \\\{\\'"abtnvfr\} brightgreen
|
2010-03-05 21:37:48 +03:00
|
|
|
keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen
|
2002-09-16 20:57:18 +04:00
|
|
|
|
2010-04-04 20:24:13 +04:00
|
|
|
keyword ' brightgreen
|
2002-09-16 20:57:18 +04:00
|
|
|
|
2002-09-30 00:22:23 +04:00
|
|
|
context ' ' green
|
2010-03-05 21:37:48 +03:00
|
|
|
spellcheck
|
2010-04-04 20:24:13 +04:00
|
|
|
keyword \\\{\\'"abtnvfr\} brightgreen
|
2010-03-05 21:37:48 +03:00
|
|
|
keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen
|
2002-09-16 20:57:18 +04:00
|
|
|
|
2010-04-04 20:24:13 +04:00
|
|
|
keyword " brightgreen
|
2017-03-16 13:42:36 +03:00
|
|
|
|
|
|
|
context ` ` green
|
|
|
|
spellcheck
|
|
|
|
keyword \\\{\\'"abtnvfr\} brightgreen
|
|
|
|
keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen
|
|
|
|
keyword ${*} yellow
|