crowbar_framework/vendor/assets/javascripts/codemirror/javascript.js
File javascript.js
has 311 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
CodeMirror.defineMode("javascript", function(config, parserConfig) {
var indentUnit = config.indentUnit;
var jsonMode = parserConfig.json;
// Tokenizer
- Create a ticketCreate a ticket
Function jsTokenBase
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function jsTokenBase(stream, state) {
var ch = stream.next();
if (ch == '"' || ch == "'")
return chain(stream, state, jsTokenString(ch));
else if (/[\[\]{}\(\),;\:\.]/.test(ch))
- Create a ticketCreate a ticket
Function JSLexical
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function JSLexical(indented, column, type, align, prev, info) {
- Create a ticketCreate a ticket
Function parseJS
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function parseJS(state, style, type, content, stream) {
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
return ret("operator", null, stream.current());
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
if (type == "default") return cont(expect(":"));
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
if (type == "operator") return cont(expression);
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
return cont();
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
if (type == "[") return cont(pushlex("]"), expression, expect("]"), poplex, maybeoperator);
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
return ret("operator", null, stream.current());
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
if (type == ";") return cont();
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
return chain(stream, state, jsTokenComment);
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
return ret("regexp", "string");
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
else if (lexical.align) return lexical.column + (closing ? 0 : 1);
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
return known ? ret(known.type, known.style, word) :
ret("variable", "variable", word);
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"),
statement, poplex, popcontext);
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
return pass(pushlex("stat"), expression, expect(";"), poplex);
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
if (type == "[") return cont(pushlex("]"), commasep(expression, "]"), poplex, maybeoperator);
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
if (type == "{") return cont(pushlex("}"), commasep(objprop, "}"), poplex, maybeoperator);
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
if (type == "case") return cont(expression, expect(":"));
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
return ret("comment", "comment");
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
if (type == "variable") return cont(pushlex("stat"), maybelabel);
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
if (type == ".") return cont(property, maybeoperator);
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"),
block, poplex, poplex);
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
if (type == "function") return cont(functiondef);
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
if (type == "for") return cont(pushlex("form"), expect("("), pushlex(")"), forspec1, expect(")"),
poplex, statement, poplex);
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
else return lexical.indented + (closing ? 0 : indentUnit);
- Create a ticketCreate a ticket