node_modules/gulp-sass/node_modules/node-sass/src/libsass/src/parser.cpp
// parse one compound selector, which is basically
// a list of simple selectors (directly adjancent)
// lex them exactly (without skipping white-space)
parse one compound selector, which is basically
a list of simple selectors (directly adjancent)
lex them exactly (without skipping white-space)
parse one compound selector which is basically a list of simple selectors ( directly adjancent ) lex them exactly ( without skipping white - space )
Compound_Selector* Parser::parse_compound_selector()
  {
    Compound_Selector* seq = SASS_MEMORY_NEW(ctx.mem, Compound_Selector, pstate);
    seq->media_block(last_media_block);
    lex< css_whitespace >();
    while (true)
    {
      lex< delimited_by< slash_star, star_slash, false > >(false);
      if (peek < re_pseudo_selector >())
      {
        (*seq) << parse_simple_selector();
      }
      else if (lex< exactly<'&'> >(false))
      {
        seq->has_parent_reference(true);
        (*seq) << SASS_MEMORY_NEW(ctx.mem, Parent_Selector, pstate);
      }
      else if (lex< re_type_selector >(false))
      {
        (*seq) << SASS_MEMORY_NEW(ctx.mem, Type_Selector, pstate, lexed);
      }
      else if (peek< spaces >()) break;
      else if (peek< end_of_file >()) { break; }
      else if (peek_css < class_char < selector_combinator_ops > >()) break;
      else if (peek_css < class_char < complex_selector_delims > >()) break;
      else {
        Simple_Selector* sel = parse_simple_selector();
        if (!sel) return 0;
        (*seq) << sel;
      }
    }
    if (seq && !peek_css<exactly<'{'>>()) {
      seq->has_line_break(peek_newline());
    }
    return seq;
  }
Compound_Selector * Parser :: parse_compound_selector ( ) { Compound_Selector * seq = SASS_MEMORY_NEW ( ctx . mem , Compound_Selector , pstate ) ; seq -> media_block ( last_media_block ) ; lex < css_whitespace > ( ) ; while ( true ) { lex < delimited_by < slash_star , star_slash , false > > ( false ) ; if ( peek < re_pseudo_selector > ( ) ) { ( * seq ) << parse_simple_selector ( ) ; } else if ( lex < exactly < ' ' > > ( false ) ) { seq -> has_parent_reference ( true ) ; ( * seq ) << SASS_MEMORY_NEW ( ctx . mem , Parent_Selector , pstate ) ; } else if ( lex < re_type_selector > ( false ) ) { ( * seq ) << SASS_MEMORY_NEW ( ctx . mem , Type_Selector , pstate , lexed ) ; } else if ( peek < spaces > ( ) ) break ; else if ( peek < end_of_file > ( ) ) { break ; } else if ( peek_css < class_char < selector_combinator_ops > > ( ) ) break ; else if ( peek_css < class_char < complex_selector_delims > > ( ) ) break ; else { Simple_Selector * sel = parse_simple_selector ( ) ; if ( ! sel ) return 0 ; ( * seq ) << sel ; } } if ( seq && ! peek_css < exactly < ' ' > > ( ) ) { seq -> has_line_break ( peek_newline ( ) ) ; } return seq ; }
parse one compound selector, which is basically
a list of simple selectors (directly adjancent)
lex them exactly (without skipping white-space)
parse one compound selector which is basically a list of simple selectors ( directly adjancent ) lex them exactly ( without skipping white - space )
// init an empty compound selector wrapper // skip initial white-space // parse list // remove all block comments (don't skip white-space) // parse functional // parse parent selector // this produces a linefeed!? // parse type selector // peek for abort conditions // otherwise parse another simple selector // EO while true