Permalink
Browse files

clean value to inside fallthrough

  • Loading branch information...
1 parent fa096ed commit a288b5b98677ce192bb44c5a3ab1bfe4e46977a8 @chjj committed Nov 28, 2011
Showing with 3 additions and 8 deletions.
  1. +3 −8 lib/lexer.js
View
@@ -117,6 +117,7 @@ var lexer = function(css) {
case '}':
switch (state()) {
case 'value':
+ assert(key !== '');
tokens.push({
type: 'property',
key: key.trim(),
@@ -126,14 +127,8 @@ var lexer = function(css) {
key = '';
buff = '';
stack.pop();
- // in case someone omitted
- // the semicolon at the end
- if (state() === 'inside') {
- ; // FALL-THROUGH
- } else {
- //break; // do we need this?
- assert(('bad state', 0));
- }
+ assert(state() === 'inside');
+ ; // FALL-THROUGH
case 'inside':
tokens.push({
type: 'end',

0 comments on commit a288b5b

Please sign in to comment.