Esempio n. 1
0
  private void parseAttribute() {
    AttributeOperator[] operators = AttributeOperator.values();

    outer:
    while (reader.hasNext()) {
      reader.consume();
      for (AttributeOperator op : operators) {
        if (op.matches(reader)) {
          op.deleteKeyword(reader);
          attribute = reader.get();
          operator = op;
          break outer;
        }
      }
    }
  }
Esempio n. 2
0
  private void parseValue0() {
    while (reader.hasNext()) {
      reader.consume();

      if (CssKeywords.stringDelimiter().matches(reader)) {
        reader.deleteKeyword(CssKeywords.stringDelimiter());
        value = reader.getUntil(CssKeywords.stringDelimiter());
        reader.deleteKeyword(CssKeywords.stringDelimiter());
        reader.skipOver(CssKeywords.attributeEnd());
        break;
      }

      if (CssKeywords.attributeEnd().matches(reader)) {
        reader.deleteKeyword(CssKeywords.attributeEnd());
        value = reader.get();
        break;
      }
    }
  }