Skip to content

Commit 4bd6fea

Browse files
kerabromsmumarijnh
authored andcommitted
[rust mode] Add struct and loop keywords
1 parent 0f371f4 commit 4bd6fea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mode/rust/rust.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
CodeMirror.defineMode("rust", function() {
1515
var indentUnit = 4, altIndentUnit = 2;
1616
var valKeywords = {
17-
"if": "if-style", "while": "if-style", "else": "else-style",
17+
"if": "if-style", "while": "if-style", "loop": "else-style", "else": "else-style",
1818
"do": "else-style", "ret": "else-style", "fail": "else-style",
1919
"break": "atom", "cont": "atom", "const": "let", "resource": "fn",
2020
"let": "let", "fn": "fn", "for": "for", "alt": "alt", "iface": "iface",
2121
"impl": "impl", "type": "type", "enum": "enum", "mod": "mod",
2222
"as": "op", "true": "atom", "false": "atom", "assert": "op", "check": "op",
2323
"claim": "op", "native": "ignore", "unsafe": "ignore", "import": "else-style",
2424
"export": "else-style", "copy": "op", "log": "op", "log_err": "op",
25-
"use": "op", "bind": "op", "self": "atom"
25+
"use": "op", "bind": "op", "self": "atom", "struct": "enum",
2626
};
2727
var typeKeywords = function() {
2828
var keywords = {"fn": "fn", "block": "fn", "obj": "obj"};

0 commit comments

Comments
 (0)