mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-26 22:59:38 +03:00
fe9da9425e
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4899 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
20 lines
655 B
Plaintext
20 lines
655 B
Plaintext
## Here is an example for Javascript.
|
|
|
|
syntax "javascript" "\.js$"
|
|
|
|
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}'"
|
|
|
|
# Strings.
|
|
color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" "'(\\.|[^'])*'"
|
|
# Comments.
|
|
color brightblue "//.*"
|
|
color brightblue start="/\*" end="\*/"
|
|
|
|
# Trailing whitespace.
|
|
color ,green "[[:space:]]+$"
|