Skip to content

Commit 254e6e7

Browse files
committed
---
yaml --- r: 32633 b: refs/heads/dist-snap c: 2018cd9 h: refs/heads/master i: 32631: 8384e2d v: v3
1 parent f3518ab commit 254e6e7

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
@@ -7,6 +7,6 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
10-
refs/heads/dist-snap: 78525299d5ca7344242c061a130c9806a385bd5b
10+
refs/heads/dist-snap: 2018cd912cc98e0c3555b3ca827ad504fe02c3d4
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/dist-snap/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)