Changed 6 instances of 'char' to 'chr'. char is a reserved word in JavaScript and should not be used as a variable name.
This commit is contained in:
parent
2fd1c7565b
commit
581668441a
1 changed files with 6 additions and 6 deletions
|
|
@ -92,15 +92,15 @@ function BracketMatch() {
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
||||||
while (valueIndex >= 0) {
|
while (valueIndex >= 0) {
|
||||||
var char = value.charAt(valueIndex);
|
var chr = value.charAt(valueIndex);
|
||||||
if (char == openBracket) {
|
if (chr == openBracket) {
|
||||||
depth -= 1;
|
depth -= 1;
|
||||||
if (depth == 0) {
|
if (depth == 0) {
|
||||||
return {row: iterator.getCurrentTokenRow(),
|
return {row: iterator.getCurrentTokenRow(),
|
||||||
column: valueIndex + iterator.getCurrentTokenColumn()};
|
column: valueIndex + iterator.getCurrentTokenColumn()};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (char == bracket) {
|
else if (chr == bracket) {
|
||||||
depth += 1;
|
depth += 1;
|
||||||
}
|
}
|
||||||
valueIndex -= 1;
|
valueIndex -= 1;
|
||||||
|
|
@ -146,15 +146,15 @@ function BracketMatch() {
|
||||||
var value = token.value;
|
var value = token.value;
|
||||||
var valueLength = value.length;
|
var valueLength = value.length;
|
||||||
while (valueIndex < valueLength) {
|
while (valueIndex < valueLength) {
|
||||||
var char = value.charAt(valueIndex);
|
var chr = value.charAt(valueIndex);
|
||||||
if (char == closingBracket) {
|
if (chr == closingBracket) {
|
||||||
depth -= 1;
|
depth -= 1;
|
||||||
if (depth == 0) {
|
if (depth == 0) {
|
||||||
return {row: iterator.getCurrentTokenRow(),
|
return {row: iterator.getCurrentTokenRow(),
|
||||||
column: valueIndex + iterator.getCurrentTokenColumn()};
|
column: valueIndex + iterator.getCurrentTokenColumn()};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (char == bracket) {
|
else if (chr == bracket) {
|
||||||
depth += 1;
|
depth += 1;
|
||||||
}
|
}
|
||||||
valueIndex += 1;
|
valueIndex += 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue