Skip to content

Commit 723bad9

Browse files
committed
---
yaml --- r: 23971 b: refs/heads/master c: 2018cd9 h: refs/heads/master i: 23969: 1063dd6 23967: f64b096 v: v3
1 parent cc5f126 commit 723bad9

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 78525299d5ca7344242c061a130c9806a385bd5b
2+
refs/heads/master: 2018cd912cc98e0c3555b3ca827ad504fe02c3d4
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/doc/lib/codemirror-rust.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ CodeMirror.defineMode("rust", function() {
22
var indentUnit = 4, altIndentUnit = 2;
33
var valKeywords = {
44
"if": "if-style", "while": "if-style", "loop": "if-style", "else": "else-style",
5-
"do": "else-style", "ret": "else-style", "fail": "else-style",
5+
"do": "else-style", "return": "else-style", "fail": "else-style",
66
"break": "atom", "cont": "atom", "const": "let", "resource": "fn",
7-
"let": "let", "fn": "fn", "for": "for", "alt": "alt", "trait": "trait",
7+
"let": "let", "fn": "fn", "for": "for", "match": "match", "trait": "trait",
88
"impl": "impl", "type": "type", "enum": "enum", "class": "atom", "mod": "mod",
99
"as": "op", "true": "atom", "false": "atom", "assert": "op", "check": "op",
1010
"claim": "op", "extern": "ignore", "unsafe": "ignore", "import": "else-style",
11-
"export": "else-style", "copy": "op", "log": "op", "log_err": "op",
12-
"use": "op", "bind": "op", "self": "atom", "new": "atom"
11+
"export": "else-style", "copy": "op", "log": "op",
12+
"use": "op", "self": "atom"
1313
};
1414
var typeKeywords = function() {
1515
var keywords = {"fn": "fn"};
@@ -197,7 +197,7 @@ CodeMirror.defineMode("rust", function() {
197197
if (type == "if-style") return cont(expression, expression);
198198
if (type == "else-style" || type == "op") return cont(expression);
199199
if (type == "for") return cont(pattern, maybetype, inop, expression, expression);
200-
if (type == "alt") return cont(expression, altbody);
200+
if (type == "match") return cont(expression, altbody);
201201
if (type == "fn") return cont(fndef);
202202
if (type == "macro") return cont(macro);
203203
return cont();
@@ -346,7 +346,7 @@ CodeMirror.defineMode("rust", function() {
346346
else return pass();
347347
}
348348
function altbody(type) {
349-
if (type == "{") return cont(pushlex("}", "alt"), altblock1, poplex);
349+
if (type == "{") return cont(pushlex("}", "match"), altblock1, poplex);
350350
return pass();
351351
}
352352
function altblock1(type) {
@@ -357,7 +357,7 @@ CodeMirror.defineMode("rust", function() {
357357
return pass(pattern, altblock2);
358358
}
359359
function altblock2(type) {
360-
if (type == "{") return cont(pushlex("}", "alt"), block, poplex, altblock1);
360+
if (type == "{") return cont(pushlex("}", "match"), block, poplex, altblock1);
361361
else return pass(altblock1);
362362
}
363363

@@ -422,7 +422,7 @@ CodeMirror.defineMode("rust", function() {
422422
type = lexical.type, closing = firstChar == type;
423423
if (type == "stat") return lexical.indented + indentUnit;
424424
if (lexical.align) return lexical.column + (closing ? 0 : 1);
425-
return lexical.indented + (closing ? 0 : (lexical.info == "alt" ? altIndentUnit : indentUnit));
425+
return lexical.indented + (closing ? 0 : (lexical.info == "match" ? altIndentUnit : indentUnit));
426426
},
427427

428428
electricChars: "{}"

0 commit comments

Comments
 (0)