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
|
|
|
|
2017-12-18 22:26:21 +03:00
|
|
|
color green "\<(async|class|const|extends|function|let|this|typeof|var|void)\>"
|
2017-12-25 17:40:05 +03:00
|
|
|
color brightyellow "\<(do|while|if|else|switch|case|default|for|each|in|of|with)\>"
|
|
|
|
color brightyellow "\<(await|export|import|throw|try|catch|finally|new|delete)\>"
|
|
|
|
color magenta "\<(break|continue|return|yield)\>"
|
2014-03-24 16:39:58 +04:00
|
|
|
|
2014-05-17 00:21:34 +04:00
|
|
|
# Strings.
|
2017-12-25 17:40:05 +03:00
|
|
|
color brightmagenta ""(\\.|[^"])*"" "'(\\.|[^'])*'" "`(\\.|[^`])*`"
|
2014-05-17 00:21:34 +04:00
|
|
|
# Comments.
|
2017-12-25 17:25:04 +03:00
|
|
|
color brightblue "(^|[[:space:]])//.*"
|
2014-03-24 16:39:58 +04:00
|
|
|
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:]]+$"
|