Sha256: 085ed3937d56e8d7721d026277fb3a97da4873aecd2e6b719a287496775b06a9

Contents?: true

Size: 845 Bytes

Versions: 91

Compression:

Stored size: 845 Bytes

Contents

var DummyParser = Editor.Parser = (function() {
  function tokenizeDummy(source) {
    while (!source.endOfLine()) source.next();
    return "text";
  }
  function parseDummy(source) {
    function indentTo(n) {return function() {return n;}}
    source = tokenizer(source, tokenizeDummy);
    var space = 0;

    var iter = {
      next: function() {
        var tok = source.next();
        if (tok.type == "whitespace") {
          if (tok.value == "\n") tok.indentation = indentTo(space);
          else space = tok.value.length;
        }
        return tok;
      },
      copy: function() {
        var _space = space;
        return function(_source) {
          space = _space;
          source = tokenizer(_source, tokenizeDummy);
          return iter;
        };
      }
    };
    return iter;
  }
  return {make: parseDummy};
})();

Version data entries

91 entries across 91 versions & 4 rubygems

Version Path
locomotive_cms-0.0.2.5 public/javascripts/admin/plugins/codemirror/parsedummy.js
locomotive_cms-0.0.2.4 public/javascripts/admin/plugins/codemirror/parsedummy.js
locomotive_cms-0.0.2.3 public/javascripts/admin/plugins/codemirror/parsedummy.js
locomotive_cms-0.0.2.2 public/javascripts/admin/plugins/codemirror/parsedummy.js
locomotive_cms-0.0.2.1 public/javascripts/admin/plugins/codemirror/parsedummy.js
locomotive_cms-0.0.2 public/javascripts/admin/plugins/codemirror/parsedummy.js
locomotive_cms-0.0.1.4 public/javascripts/admin/plugins/codemirror/parsedummy.js
locomotive_cms-0.0.1.3 public/javascripts/admin/plugins/codemirror/parsedummy.js
locomotive_cms-0.0.1.2 public/javascripts/admin/plugins/codemirror/parsedummy.js
locomotive_cms-0.0.1.1 public/javascripts/admin/plugins/codemirror/parsedummy.js
locomotive_cms-0.0.1 public/javascripts/admin/plugins/codemirror/parsedummy.js