@@ -2,14 +2,14 @@ CodeMirror.defineMode("rust", function() {
2
2
var indentUnit = 4 , altIndentUnit = 2 ;
3
3
var valKeywords = {
4
4
"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" ,
6
6
"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" ,
8
8
"impl" : "impl" , "type" : "type" , "enum" : "enum" , "class" : "atom" , "mod" : "mod" ,
9
9
"as" : "op" , "true" : "atom" , "false" : "atom" , "assert" : "op" , "check" : "op" ,
10
10
"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"
13
13
} ;
14
14
var typeKeywords = function ( ) {
15
15
var keywords = { "fn" : "fn" } ;
@@ -197,7 +197,7 @@ CodeMirror.defineMode("rust", function() {
197
197
if ( type == "if-style" ) return cont ( expression , expression ) ;
198
198
if ( type == "else-style" || type == "op" ) return cont ( expression ) ;
199
199
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 ) ;
201
201
if ( type == "fn" ) return cont ( fndef ) ;
202
202
if ( type == "macro" ) return cont ( macro ) ;
203
203
return cont ( ) ;
@@ -346,7 +346,7 @@ CodeMirror.defineMode("rust", function() {
346
346
else return pass ( ) ;
347
347
}
348
348
function altbody ( type ) {
349
- if ( type == "{" ) return cont ( pushlex ( "}" , "alt " ) , altblock1 , poplex ) ;
349
+ if ( type == "{" ) return cont ( pushlex ( "}" , "match " ) , altblock1 , poplex ) ;
350
350
return pass ( ) ;
351
351
}
352
352
function altblock1 ( type ) {
@@ -357,7 +357,7 @@ CodeMirror.defineMode("rust", function() {
357
357
return pass ( pattern , altblock2 ) ;
358
358
}
359
359
function altblock2 ( type ) {
360
- if ( type == "{" ) return cont ( pushlex ( "}" , "alt " ) , block , poplex , altblock1 ) ;
360
+ if ( type == "{" ) return cont ( pushlex ( "}" , "match " ) , block , poplex , altblock1 ) ;
361
361
else return pass ( altblock1 ) ;
362
362
}
363
363
@@ -422,7 +422,7 @@ CodeMirror.defineMode("rust", function() {
422
422
type = lexical . type , closing = firstChar == type ;
423
423
if ( type == "stat" ) return lexical . indented + indentUnit ;
424
424
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 ) ) ;
426
426
} ,
427
427
428
428
electricChars : "{}"
0 commit comments