nl_tokens: Helper function that searches for CSS property value range next to iterator s current position
pl_tokens: function findValueRange ( it ) { // find value start position var skipTokens = [ 'white' , 'line' , ':' ] ; var tokens = [ ] , token , start , end ; it . nextUntil ( function ( tok ) { return ! _ . include ( skipTokens , this . itemNext ( ) . type ) ; } ) ; start = it . current ( ) . end ; // consume value while ( token = it . next ( ) ) { if ( token . type == '}' || token . type == ';' ) { // found value end trimWhitespaceTokens ( tokens , WHITESPACE_REMOVE_FROM_START | ( token . type == '}' ? WHITESPACE_REMOVE_FROM_END : 0 ) ) ; if ( tokens . length ) { start = tokens [ 0 ] . start ; end = _ . last ( tokens ) . end ; } else { <mask> = start ; } return range ( start , end - start ) ; } tokens . push ( token ) ; } // reached the end of tokens list if ( tokens . length ) { return range ( tokens [ 0 ] . start , _ . last ( tokens ) . end - tokens [ 0 ] . start ) ; } }