Fix bug with array iteration.

This commit is contained in:
William Candillon 2013-01-27 19:32:50 +01:00 • committed by nightwing
commit f65d123dc8

View file

@ -266,9 +266,9 @@ exports.XQueryLexer = function() {
var diff = cachedLine.length - line.length; var diff = cachedLine.length - line.length;
var idx = 0; var idx = 0;
var col = 0; var col = 0;
for(var i in tokens) { for(var i = 0; i < tokens.length; i++) {
var token = tokens[i]; var token = tokens[i];
for(var j in this.tokens[row]) { for(var j = 0; j < this.tokens[row].length; j++) {
var semanticToken = this.tokens[row][j]; var semanticToken = this.tokens[row][j];
if( if(
((col + token.value.length) <= begin.length && semanticToken.sc === col && semanticToken.ec === (col + token.value.length)) || ((col + token.value.length) <= begin.length && semanticToken.sc === col && semanticToken.ec === (col + token.value.length)) ||