Esempio n. 1
0
 /**
  * Adds some characters to the entity.
  *
  * @param ent token builder
  * @throws IOException I/O exception
  */
 private void completeRef(final TokenBuilder ent) throws IOException {
   int ch = consume();
   while (ent.size() < 10 && ch >= ' ' && ch != ';') {
     ent.add(ch);
     ch = consume();
   }
 }
Esempio n. 2
0
 @Override
 public String toString() {
   final TokenBuilder tb = new TokenBuilder("map { ");
   boolean key = true;
   for (final Expr e : expr) {
     tb.add(key ? tb.size() > 6 ? ", " : "" : ":=").add(e.toString());
     key ^= true;
   }
   return tb.add(" }").toString();
 }