File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed
Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -55,17 +55,16 @@ CSSOM.parse = function parse(token) {
5555
5656 var atKeyframesRegExp = / @ ( - (?: \w + - ) + ) ? k e y f r a m e s / 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
You can’t perform that action at this time.
0 commit comments