# # JavaScript syntax highlighting # for MC Editor/CoolEdit # # Author: Vlad Romanenko # Based on c.syntax # # TODO: # Highlight JS regexpressions /../ # More built-in functions # # 2002-09-17 Vlad Romanenko # * More C and Java consistency by Pavel Roskin . # * Advanced number highlighting. # # 2002-09-16 Vlad Romanenko # * Initial public release. # context default #========================= # Keywords keyword whole arguments yellow/24 keyword whole break yellow/24 keyword whole caller yellow/24 keyword whole case yellow/24 keyword whole catch yellow/24 keyword whole constructor yellow/24 keyword whole continue yellow/24 keyword whole else yellow/24 keyword whole default yellow/24 keyword whole delete yellow/24 keyword whole for yellow/24 keyword whole function yellow/24 keyword whole if yellow/24 keyword whole in yellow/24 keyword whole instanceof yellow/24 keyword whole new yellow/24 keyword whole prototype yellow/24 keyword whole return yellow/24 keyword whole switch yellow/24 keyword whole this yellow/24 keyword whole throw yellow/24 keyword whole try yellow/24 keyword whole typeof yellow/24 keyword whole var yellow/24 keyword whole while yellow/24 keyword whole with yellow/24 #========================= # Objects keyword whole ActiveXObject yellow/24 keyword whole Array yellow/24 keyword whole Boolean yellow/24 keyword whole Date yellow/24 keyword whole Dictionary yellow/24 keyword whole Enumerator yellow/24 keyword whole FileSystemObject yellow/24 keyword whole Function yellow/24 keyword whole Global yellow/24 keyword whole Image yellow/24 keyword whole Math yellow/24 keyword whole Number yellow/24 keyword whole Object yellow/24 keyword whole TextStream yellow/24 keyword whole RegExp yellow/24 keyword whole VBArray yellow/24 #========================= # Most common functions keyword whole alert yellow/24 keyword whole escape yellow/24 keyword whole eval yellow/24 keyword whole indexOf yellow/24 keyword whole isNaN yellow/24 keyword whole toString yellow/24 keyword whole unescape yellow/24 keyword whole valueOf yellow/24 #========================= # Constants keyword whole false brightgreen/16 keyword whole null brightgreen/16 keyword whole true brightgreen/16 keyword whole undefined yellow/24 #========================= # Comments keyword /\* brown/22 keyword \*/ brown/22 keyword // brown/22 #========================= # Numbers wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_. keyword whole 0\{xX\}\{0123456789abcdefABCDEF\}\[0123456789abcdefABCDEF\] brightgreen/16 keyword whole \{0123456789\}\[0123456789\] brightgreen/16 keyword whole \[0123456789\]\.\{0123456789\}\[0123456789\] brightgreen/16 keyword whole \{0123456789\}\[0123456789\]\.\[0123456789\] brightgreen/16 keyword whole \{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen/16 keyword whole \{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen/16 keyword whole \{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen/16 keyword whole \{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen/16 #========================= # Special symbols keyword \. yellow/24 keyword \* yellow/24 keyword \+ yellow/24 keyword - yellow/24 keyword / yellow/24 keyword % yellow/24 keyword = yellow/24 keyword ! yellow/24 keyword & yellow/24 keyword | yellow/24 keyword ^ yellow/24 keyword ~ yellow/24 keyword > yellow/24 keyword < yellow/24 #========================= # Separators keyword { brightcyan/14 keyword } brightcyan/14 keyword ( brightcyan/14 keyword ) brightcyan/14 keyword [ brightcyan/14 keyword ] brightcyan/14 keyword , brightcyan/14 keyword ? brightcyan/14 keyword : brightcyan/14 keyword ; brightmagenta/19 #============================= # Comments context exclusive /\* \*/ brown/22 spellcheck keyword whole BUG brightred/18 keyword whole FixMe brightred/18 keyword whole FIXME brightred/18 keyword whole Note brightred/18 keyword whole NOTE brightred/18 keyword whole ToDo brightred/18 keyword whole TODO brightred/18 keyword !!\[!\] brightred/18 keyword ??\[?\] brightred/18 context exclusive // \n brown/22 spellcheck keyword whole BUG brightred/18 keyword whole FixMe brightred/18 keyword whole FIXME brightred/18 keyword whole Note brightred/18 keyword whole NOTE brightred/18 keyword whole ToDo brightred/18 keyword whole TODO brightred/18 keyword !!\[!\] brightred/18 keyword ??\[?\] brightred/18 #============================= # Strings context " " green/6 spellcheck keyword \\\{\\'"abtnvfr\} brightgreen/16 keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen/16 keyword ' brightgreen/16 context ' ' green/6 spellcheck keyword \\\{\\'"abtnvfr\} brightgreen/16 keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen/16 keyword " brightgreen/16