code: private void concatenateExtendsRecursive( String selector, boolean isReference, String allSelector ) {
          List<String[]> list = exact.get( selector );
          if( list != null ) {
              for( String[] lessExtend : list ) {
                  for( String sel : lessExtend ) {
                      boolean needRecursion = selectorList.add( sel );
                      if( needRecursion ) { //only if there are new entries then we need to try a recursion, else we have a stack overflow
                          concatenateExtendsRecursive( sel, isReference, sel );
                      }
                  }
              }
          }
          SelectorTokenizer tokenizer = tokenizers.pollLast().init( allSelector );
          do {
              String token = tokenizer.next();
              if( token == null ) {
                  break;
              }
              List<LessExtendResult> results = all.get( token );
              if( results != null ) {
                  for( LessExtendResult lessExtend : results ) {
                      String extendingSelector = lessExtend.getExtendingSelector();
                      if( selector.contains( extendingSelector ) ) {
                          for( String replace : lessExtend.getSelectors() ) {
                              String replacedSelector = selector.replace( extendingSelector, replace );
                              boolean needRecursion = selectorList.add( replacedSelector );
                              if( needRecursion && !replacedSelector.contains( extendingSelector ) ) {
                                  concatenateExtendsRecursive( replacedSelector, isReference, replace );
                              }
                          }
                      }
                  }
              }
          } while( true );
          tokenizers.addLast( tokenizer );
      }
docs: Add to the given selector all possible extends to the internal selectorList. This method is call recursive.
  
  @param selector
  current selector
  @param isReference
  if the current rule is in a less file which was import with "reference" keyword
  @param allSelector
  selector that should match with the "all" keyword. By default is this equals of the selector. Only on
  recursion this is only the replaced part.