Skip to content

Commit a7ded1f

Browse files
committed
More descriptive variable names
* Indent a code properly * Use one `var` per variable
1 parent ae566d1 commit a7ded1f

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

lib/parse.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,16 @@ CSSOM.parse = function parse(token) {
5555

5656
var atKeyframesRegExp = /@(-(?:\w+-)+)?keyframes/g;
5757

58-
var parseError = function (msg) {
59-
var tmp = token.substring(0, i).split('\n'),
60-
lines = tmp.length,
61-
chars = tmp.pop().length;
62-
var err = new Error(msg + ' (line ' + lines + ', char ' + chars + ')');
63-
err.line = lines;
64-
err.char = chars;
65-
err.styleSheet = styleSheet;
66-
throw err;
67-
};
68-
58+
var parseError = function(message) {
59+
var lines = token.substring(0, i).split('\n');
60+
var lineCount = lines.length;
61+
var charCount = lines.pop().length;
62+
var error = new Error(message + ' (line ' + lineCount + ', char ' + charCount + ')');
63+
error.line = lineCount;
64+
error.char = charCount;
65+
error.styleSheet = styleSheet;
66+
throw error;
67+
};
6968

7069
for (var character; character = token.charAt(i); i++) {
7170

0 commit comments

Comments
 (0)