Skip to content

Commit

Permalink
Minor code shuffling in comment handling to minimize the operations.
Browse files Browse the repository at this point in the history
  • Loading branch information
ariya committed Jul 21, 2012
1 parent 2101991 commit 3cba286
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions esprima.js
Expand Up @@ -3137,15 +3137,15 @@ parseStatement: true, parseSourceElement: true */
} else if (ch === '/') {
ch = source[index + 1];
if (ch === '/') {
start = index;
index += 2;
lineComment = true;
loc = {
start: {
line: lineNumber,
column: index - lineStart - 2
column: index - lineStart
}
};
start = index;
index += 2;
lineComment = true;
if (index >= length) {
loc.end = {
line: lineNumber,
Expand Down

0 comments on commit 3cba286

Please sign in to comment.