fix prefix _ in Rust syntax

it should be handled as the start of an identifier
This commit is contained in:
リキ萌え 2024-11-25 16:59:51 +01:00
parent d658874fd7
commit b522732a67

View file

@ -20,8 +20,7 @@
"regex": "0[xX][0-9a-fA-F_]+([uif](8|16|32|64|128))?", "regex": "0[xX][0-9a-fA-F_]+([uif](8|16|32|64|128))?",
"is": "literal" "is": "literal"
}, },
{ "regex": "[0-9_]+n", "is": "literal" }, { "regex": "[0-9][0-9]*(\\.[0-9_]*([eE][-+]?[0-9_]+)?)?", "is": "literal" },
{ "regex": "[0-9_]+(\\.[0-9_]*([eE][-+]?[0-9_]+)?)?", "is": "literal" },
{ "regex": "[+=/*^%<>!~|&\\.?:@-]+", "is": "operator" }, { "regex": "[+=/*^%<>!~|&\\.?:@-]+", "is": "operator" },
{ "regex": "#!\\[", "is": "default" }, { "regex": "#!\\[", "is": "default" },
{ {
@ -29,7 +28,7 @@
"is": { "default": "function", "captures": ["default"] } "is": { "default": "function", "captures": ["default"] }
}, },
{ "regex": "[a-zA-Z_][a-zA-Z0-9_]*!", "is": "function" }, { "regex": "[a-zA-Z_][a-zA-Z0-9_]*!", "is": "function" },
{ "regex": "[A-Z_][a-zA-Z0-9_]*", "is": "keyword2" }, { "regex": "[A-Z][a-zA-Z0-9_]*", "is": "keyword2" },
{ {
"regex": "union\\s+([a-zA-Z_][a-zA-Z0-9_]*)", "regex": "union\\s+([a-zA-Z_][a-zA-Z0-9_]*)",
"is": { "is": {