code: function(lineStyle, lineIndex) {
  			function token2Class(token) {
  				if (!token) { return null; }
  				if (token === TAB || token === SPACE) { return token; }
  				return "cm-" + token;
  			}
  			var style = lineStyle.style;
  			if (!style) { return null; }
  			var ranges = [], errors = [];
  			var offset = (typeof lineIndex === "undefined") ? 0 : this.model.getLineStart(lineIndex);
  			for (var i=0; i < style.length; i++) {
  				var elem = style[i]; // shape is [start, end, token]
  				var className = token2Class(elem[2]);
  				if (!className) { continue; }
  				var obj = {
  					start: offset + elem[0],
  					end: offset + elem[1],
  					style: {styleClass: className} };
  				ranges.push(obj);
  				if (className === "cm-error") {
  					errors.push(obj);
  				}
  			}
  			return [ranges, errors];
  		}
docs: Converts a <code>MirrorLineStyle</code> to a {@link orion.editor.StyleRange[]}.
  @param {orion.mirror.MirrorLineStyle} style The line style to convert.
  @param {Number} [lineIndex] The line index of the line having the given style. If omitted, the returned
  {@link orion.editor.StyleRange[]} objects will have offsets relative to the line, not the document.
  
  @returns {Array} An array of 2 elements. The first element is an {@link orion.editor.StyleRange[]} giving the styles for the line.
  The second element is an {@link orion.editor.StyleRange[]} containing only those elements of the first array that represent
  syntax errors. (By CodeMirror convention, anything assigned the <code>"cm-error"</code> tag is assumed to be an error).</p>