Minor improvements.

This commit is contained in:
William Candillon 2013-01-25 12:44:17 +01:00 • committed by nightwing
commit c51e32252b
2 changed files with 0 additions and 15 deletions

View file

@ -135,7 +135,6 @@ oop.inherits(Mode, TextMode);
}); });
worker.on("highlight", function(tokens) { worker.on("highlight", function(tokens) {
//console.log(that.$deltas);
//if(that.$deltas.length > 0) return; //if(that.$deltas.length > 0) return;
that.$tokenizer.tokens = tokens.data.tokens; that.$tokenizer.tokens = tokens.data.tokens;
that.$tokenizer.lines = tokens.data.lines; that.$tokenizer.lines = tokens.data.lines;

View file

@ -242,17 +242,10 @@ exports.XQueryLexer = function() {
} catch(e) { } catch(e) {
if(e instanceof tokenizer.ParseException) { if(e instanceof tokenizer.ParseException) {
//var message = tokenizer.getErrorMessage(e);
//console.log(stack[stack.length - 1]);
//console.log(line);
//console.log(line.substring(e.getBegin(), e.getEnd()));
//console.log(message);
var index = 0; var index = 0;
for(var i in tokens) { for(var i in tokens) {
index += tokens[i].value.length; index += tokens[i].value.length;
} }
//console.log("Index: " + index);
//console.log("Begin: " + e.getBegin());
tokens.push({ type: "text", value: line.substring(index) }); tokens.push({ type: "text", value: line.substring(index) });
return { return {
tokens: tokens, tokens: tokens,
@ -285,13 +278,6 @@ exports.XQueryLexer = function() {
} }
col += token.value.length; col += token.value.length;
} }
console.log("======");
console.log(sharedStart([line, this.lines[row]]));
console.log(this.lines[row]);
console.log(line);
console.log(line.length - this.lines[row].length);
console.log("======");
} }
return { return {