protected DCErroneous erroneous(String code, int pos) { int i = bp - 1; loop: while (i > pos) { switch (buf[i]) { case '\f': case '\n': case '\r': newline = true; break; case '\t': case ' ': break; default: break loop; } i--; } textStart = -1; return m.at(pos).Erroneous(newString(pos, i + 1), diagSource, code); }
protected DCErroneous erroneous(String code, int pos) { int i = bp - 1; loop: while (i > pos) { switch (buf[i]) { case '\f': case '\n': case '\r': newline = true; break; case '\t': case ' ': break; default: break loop; } i--; } textStart = -1; return m.at(pos).Erroneous(newString(pos, i + 1), diagSource, code); }
protected void addPendingText(ListBuffer<DCTree> list, int textEnd) { if (textStart != -1) { if (textStart <= textEnd) { list.add(m.at(textStart).Text(newString(textStart, textEnd + 1))); } textStart = -1; } }
protected void addPendingText(ListBuffer<DCTree> list, int textEnd) { if (textStart != -1) { if (textStart <= textEnd) { list.add(m.at(textStart).Text(newString(textStart, textEnd + 1))); } textStart = -1; } }
throw new ParseException("dc.unterminated.signature"); String sig = newString(pos, bp);
/** * Read a quoted string. * It is an error if the beginning of the next tag is detected. */ @SuppressWarnings("fallthrough") protected DCText quotedString() { int pos = bp; nextChar(); loop: while (bp < buflen) { switch (ch) { case '\n': case '\r': case '\f': newline = true; break; case ' ': case '\t': break; case '"': nextChar(); // trim trailing white-space? return m.at(pos).Text(newString(pos, bp)); case '@': if (newline) break loop; } nextChar(); } return null; }
/** * Read a quoted string. * It is an error if the beginning of the next tag is detected. */ @SuppressWarnings("fallthrough") protected DCText quotedString() { int pos = bp; nextChar(); loop: while (bp < buflen) { switch (ch) { case '\n': case '\r': case '\f': newline = true; break; case ' ': case '\t': break; case '"': nextChar(); // trim trailing white-space? return m.at(pos).Text(newString(pos, bp)); case '@': if (newline) break loop; } nextChar(); } return null; }
throw new ParseException("dc.unterminated.signature"); String sig = newString(pos, bp);
return m.at(pos).Text(newString(pos, bp));
return m.at(pos).Text(newString(pos, bp));
newline = false; addPendingText(trees, bp - 1); trees.add(m.at(bp).Erroneous(newString(bp, bp+1), diagSource, "dc.bad.gt")); nextChar(); if (textStart == -1) {
newline = false; addPendingText(trees, bp - 1); trees.add(m.at(bp).Erroneous(newString(bp, bp+1), diagSource, "dc.bad.gt")); nextChar(); if (textStart == -1) {
return m.at(p).Comment(newString(p, bp));
return m.at(p).Comment(newString(p, bp));