add `of` keyword to language_js.lua and improve js string syntax highlighting in (#186)

This commit is contained in:
Cukmekerb 2021-05-16 23:56:21 -07:00 committed by GitHub
parent c7b1a6f53e
commit bd4efa14a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -7,7 +7,7 @@ syntax.add {
patterns = { patterns = {
{ pattern = "//.-\n", type = "comment" }, { pattern = "//.-\n", type = "comment" },
{ pattern = { "/%*", "%*/" }, type = "comment" }, { pattern = { "/%*", "%*/" }, type = "comment" },
{ pattern = { '/', '/', '\\' }, type = "string" }, { pattern = { '/%g', '/', '\\' }, type = "string" },
{ pattern = { '"', '"', '\\' }, type = "string" }, { pattern = { '"', '"', '\\' }, type = "string" },
{ pattern = { "'", "'", '\\' }, type = "string" }, { pattern = { "'", "'", '\\' }, type = "string" },
{ pattern = { "`", "`", '\\' }, type = "string" }, { pattern = { "`", "`", '\\' }, type = "string" },
@ -41,6 +41,7 @@ syntax.add {
["if"] = "keyword", ["if"] = "keyword",
["import"] = "keyword", ["import"] = "keyword",
["in"] = "keyword", ["in"] = "keyword",
["of"] = "keyword",
["instanceof"] = "keyword", ["instanceof"] = "keyword",
["let"] = "keyword", ["let"] = "keyword",
["new"] = "keyword", ["new"] = "keyword",