code: public Stylesheet parse() throws ParseException {
          while (tokenizer.more()) {
              if (tokenizer.current().isKeyword(KEYWORD_IMPORT)) {
                  // Handle @import
                  parseImport();
              } else if (tokenizer.current().isKeyword(KEYWORD_MIXIN)) {
                  // Handle @mixin
                  Mixin mixin = parseMixin();
                  if (mixin.getName() != null) {
                      result.addMixin(mixin);
                  }
              } else if (tokenizer.current().isKeyword(KEYWORD_MEDIA)) {
                  // Handle @media
                  result.addSection(parseSection(true));
              } else if (tokenizer.current().isSpecialIdentifier("$") && tokenizer.next().isSymbol(":")) {
                  // Handle variable definition
                  parseVariableDeclaration();
              } else {
                  // Everything else is a "normal" section  with selectors and attributes
                  result.addSection(parseSection(false));
              }
          }
  
          // Something went wrong? Throw an exception
          if (!tokenizer.getProblemCollector().isEmpty()) {
              throw ParseException.create(tokenizer.getProblemCollector());
          }
  
          return result;
      }
docs: Parses the given input returning the parsed stylesheet.
  
  @return the AST representation of the parsed input
  @throws ParseException if one or more problems occurred while parsing