lib/parser.js
function() {
    if (this.isSelectorToken(1)) {
      if ('{' == this.peek().type) {
        // unclosed, must be a block
        if (!this.lineContains('}')) return;
        // check if ':' is within the braces.
        // though not required by Stylus, chances
        // are if someone is using {} they will
        // use CSS-style props, helping us with
        // the ambiguity in this case
        var i = 0
          , la;
        while (la = this.lookahead(++i)) {
          if ('}' == la.type) {
            // Check empty block.
            if (i == 2 || (i == 3 && this.lookahead(i - 1).type == 'space'))
              return;
            break;
          }
          if (':' == la.type) return;
        }
      }
      return this.next();
    }
  }
function() {
    if (this.isSelectorToken(1)) {
      if ('{' == this.peek().type) {
        // unclosed, must be a block
        if (!this.lineContains('}')) return;
        // check if ':' is within the braces.
        // though not required by Stylus, chances
        // are if someone is using {} they will
        // use CSS-style props, helping us with
        // the ambiguity in this case
        var i = 0
          , la;
        while (la = this.lookahead(++i)) {
          if ('}' == la.type) {
            // Check empty block.
            if (i == 2 || (i == 3 && this.lookahead(i - 1).type == 'space'))
              return;
            break;
          }
          if (':' == la.type) return;
        }
      }
      return this.next();
    }
  }
function ( ) { if ( this . isSelectorToken ( 1 ) ) { if ( '{' == this . peek ( ) . type ) { // unclosed, must be a block if ( ! this . lineContains ( '}' ) ) return ; // check if ':' is within the braces. // though not required by Stylus, chances // are if someone is using {} they will // use CSS-style props, helping us with // the ambiguity in this case var i = 0 , la ; while ( la = this . lookahead ( ++ i ) ) { if ( '}' == la . type ) { // Check empty block. if ( i == 2 || ( i == 3 && this . lookahead ( i - 1 ) . type == 'space' ) ) return ; break ; } if ( ':' == la . type ) return ; } } return this . next ( ) ; } }
Valid selector tokens.
Valid selector tokens .