},
// {@code text}
new TagParser(Kind.INLINE, DCTree.Kind.CODE) {
public DCTree parse(int pos) throws ParseException {
DCTree text = inlineText();
nextChar();
return m.at(pos).Code((DCText) text);
}
},
// @deprecated deprecated-text
new TagParser(Kind.BLOCK, DCTree.Kind.DEPRECATED) {
public DCTree parse(int pos) {
List<DCTree> reason = blockContent();
return m.at(pos).Deprecated(reason);
}
},
// {@docRoot}
new TagParser(Kind.INLINE, DCTree.Kind.DOC_ROOT) {
public DCTree parse(int pos) throws ParseException {
if (ch == '}') {
nextChar();
return m.at(pos).DocRoot();
}
inlineText(); // skip unexpected content
nextChar();
throw new ParseException("dc.unexpected.content");
}
},
// @exception class-name description
new TagParser(Kind.BLOCK, DCTree.Kind.EXCEPTION) {
public DCTree parse(int pos) throws ParseException {
skipWhitespace();
DCReference ref = reference(false);
List<DCTree> description = blockContent();
return m.at(pos).Exception(ref, description);
}
},
// {@inheritDoc}
new TagParser(Kind.INLINE, DCTree.Kind.INHERIT_DOC) {
public DCTree parse(int pos) throws ParseException {
if (ch == '}') {
nextChar();
return m.at(pos).InheritDoc();
}
inlineText(); // skip unexpected content
nextChar();
throw new ParseException("dc.unexpected.content");
}
},
// {@link package.class#member label}
new TagParser(Kind.INLINE, DCTree.Kind.LINK) {
public DCTree parse(int pos) throws ParseException {
DCReference ref = reference(true);
List<DCTree> label = inlineContent();
return m.at(pos).Link(ref, label);
}
},
// {@linkplain package.class#member label}
new TagParser(Kind.INLINE, DCTree.Kind.LINK_PLAIN) {
public DCTree parse(int pos) throws ParseException {
DCReference ref = reference(true);
List<DCTree> label = inlineContent();
return m.at(pos).LinkPlain(ref, label);
}
},
// {@literal text}
new TagParser(Kind.INLINE, DCTree.Kind.LITERAL) {
public DCTree parse(int pos) throws ParseException {
DCTree text = inlineText();
nextChar();
return m.at(pos).Literal((DCText) text);
}
},