syntax: javascript: add newer keywords and string syntax

master
Mike Frysinger 2017-12-18 14:26:21 -05:00 committed by Benno Schulenberg
parent 23d66949e1
commit 8e0a7ec20d
1 changed files with 3 additions and 3 deletions

View File

@ -4,14 +4,14 @@ syntax "javascript" "\.js$"
comment "//"
color brightred "\<[A-Z_][0-9A-Z_]+\>"
color green "\<(const|function|let|this|typeof|var|void)\>"
color green "\<(async|class|const|extends|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 brightyellow "\<(await|export|import|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 "<[^= ]*>" ""(\\.|[^"])*"" "'(\\.|[^'])*'"
color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" "'(\\.|[^'])*'" "`(\\.|[^`])*`"
# Comments.
color brightblue "//.*"
color brightblue start="/\*" end="\*/"