2014-03-24 16:39:58 +04:00
|
|
|
## Here is an example for Javascript.
|
2014-05-17 00:21:34 +04:00
|
|
|
|
2014-03-24 16:39:58 +04:00
|
|
|
syntax "javascript" "\.js$"
|
2016-05-25 23:13:50 +03:00
|
|
|
comment "//"
|
2014-05-17 00:21:34 +04:00
|
|
|
|
2014-03-24 16:39:58 +04:00
|
|
|
color brightred "\<[A-Z_][0-9A-Z_]+\>"
|
|
|
|
color green "\<(const|function|let|this|typeof|var|void)\>"
|
|
|
|
color brightyellow "\<(for|if|while|with|do|else|case|default|switch)\>"
|
|
|
|
color brightyellow "\<(export|try|throw|catch|new|delete)\>"
|
|
|
|
color magenta "\<(continue|break|return|yield)\>"
|
|
|
|
color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
|
|
|
|
|
2014-05-17 00:21:34 +04:00
|
|
|
# Strings.
|
2014-03-24 16:39:58 +04:00
|
|
|
color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" "'(\\.|[^'])*'"
|
2014-05-17 00:21:34 +04:00
|
|
|
# Comments.
|
2014-03-24 16:39:58 +04:00
|
|
|
color brightblue "//.*"
|
|
|
|
color brightblue start="/\*" end="\*/"
|
|
|
|
|
2014-05-17 00:21:34 +04:00
|
|
|
# Trailing whitespace.
|
2014-03-24 16:39:58 +04:00
|
|
|
color ,green "[[:space:]]+$"
|