diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2012-03-26 18:35:18 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2012-03-26 18:35:18 -0700 |
| commit | 6e6798c4e17d9ffa33c0573f329c772e9d96739e (patch) | |
| tree | 64d4a01e7ed41092983f623b9b0fe0e5abc25200 /doc/lib/codemirror-rust.js | |
| parent | 34283ce7e840cbec4ec5704616614dbccdc08e81 (diff) | |
| download | rust-6e6798c4e17d9ffa33c0573f329c772e9d96739e.tar.gz rust-6e6798c4e17d9ffa33c0573f329c772e9d96739e.zip | |
Bulk-edit mutable -> mut.
Diffstat (limited to 'doc/lib/codemirror-rust.js')
| -rw-r--r-- | doc/lib/codemirror-rust.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/lib/codemirror-rust.js b/doc/lib/codemirror-rust.js index fb2f1c5a91a..626351e236c 100644 --- a/doc/lib/codemirror-rust.js +++ b/doc/lib/codemirror-rust.js @@ -218,14 +218,14 @@ CodeMirror.defineMode("rust", function() { if (content == "|") return cont(blockvars, poplex, pushlex("}", "block"), block); if (content == "||") return cont(poplex, pushlex("}", "block"), block); } - if (content == "mutable" || (content.match(/^\w+$/) && cx.stream.peek() == ":" + if (content == "mut" || (content.match(/^\w+$/) && cx.stream.peek() == ":" && !cx.stream.match("::", false))) return pass(record_of(expression)); return pass(block); } function record_of(comb) { function ro(type) { - if (content == "mutable" || content == "with") {cx.marked = "keyword"; return cont(ro);} + if (content == "mut" || content == "with") {cx.marked = "keyword"; return cont(ro);} if (content.match(/^\w*$/)) {cx.marked = "variable"; return cont(ro);} if (type == ":") return cont(comb, ro); if (type == "}") return cont(); @@ -317,7 +317,7 @@ CodeMirror.defineMode("rust", function() { } function rtype(type) { if (type == "name") {cx.marked = "variable-3"; return cont(rtypemaybeparam); } - if (content == "mutable") {cx.marked = "keyword"; return cont(rtype);} + if (content == "mut") {cx.marked = "keyword"; return cont(rtype);} if (type == "atom") return cont(rtypemaybeparam); if (type == "op" || type == "obj") return cont(rtype); if (type == "fn") return cont(fntype); |
