From 8e0a7ec20d979f56fb9b9a2beb41bc78bc4a1e23 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 18 Dec 2017 14:26:21 -0500 Subject: [PATCH] syntax: javascript: add newer keywords and string syntax --- syntax/javascript.nanorc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/syntax/javascript.nanorc b/syntax/javascript.nanorc index f6a54152..4324450d 100644 --- a/syntax/javascript.nanorc +++ b/syntax/javascript.nanorc @@ -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="\*/"