language_js: support binary and octal representation (#1710)

This commit is contained in:
Takase 2024-01-21 10:18:13 +08:00 committed by takase1121
parent a389adbaf5
commit bbc524ad82
No known key found for this signature in database
GPG Key ID: 60EEFFC68EB3031B
1 changed files with 11 additions and 11 deletions

View File

@ -63,7 +63,7 @@ syntax.add {
{ pattern = { '"', '"', '\\' }, type = "string" },
{ pattern = { "'", "'", '\\' }, type = "string" },
{ pattern = { "`", "`", '\\' }, type = "string" },
{ pattern = "0x[%da-fA-F_]+n?()%s*()/?", type = {"number", "normal", "operator"} },
{ pattern = "-?0[xXbBoO][%da-fA-F_]+n?()%s*()/?", type = {"number", "normal", "operator"} },
{ pattern = "-?%d+[%d%.eE_n]*()%s*()/?", type = {"number", "normal", "operator"} },
{ pattern = "-?%.?%d+()%s*()/?", type = {"number", "normal", "operator"} },
{ pattern = "[%+%-=/%*%^%%<>!~|&]", type = "operator" },