(function(mod){if(typeof exports=="object"&&typeof module=="object")mod(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],mod);else mod(CodeMirror)})(function(CodeMirror){"use strict";CodeMirror.defineSimpleMode=function(name,states){CodeMirror.defineMode(name,function(config){return CodeMirror.simpleMode(config,states)})};CodeMirror.simpleMode=function(config,states){ensureState(states,"start");var states_={},meta=states.meta||{},hasIndentation=false;for(var state in states)if(state!=meta&&states.hasOwnProperty(state)){var list=states_[state]=[],orig=states[state];for(var i=0;i2&&rule.token&&typeof rule.token!="string"){state.pending=[];for(var j=2;j-1)return CodeMirror.Pass;var pos=state.indent.length-1,rules=states[state.state];scan:for(;;){for(var i=0;i