int offset = 0;
while ((offset = text.content.index_of_char ('.', offset)) >= 0) {
if (offset >= 2) {
- // ignore e.g.
+ // ignore "e.g."
unowned string cmp4 = ((string) (((char*) text.content) + offset - 2));
if (cmp4.has_prefix (" e.g.") || cmp4.has_prefix ("(e.g.")) {
offset = offset + 3;
continue;
}
- // ignore i.e.
+ // ignore "i.e."
if (cmp4.has_prefix (" i.e.") || cmp4.has_prefix ("(i.e.")) {
offset = offset + 3;
continue;
}
}
+ unowned string cmp0 = ((string) (((char*) text.content) + offset));
+
+ // ignore ... (varargs)
+ if (cmp0.has_prefix ("...")) {
+ offset = offset + 3;
+ continue;
+ }
+
Text sec = factory.create_text (text.content.substring (offset+1, -1));
text.content = text.content.substring (0, offset+1);
return sec;
return (int) ((char*) a - (char*) b);
}
+ private inline int vararg_prefix () {
+ if (this.pos.has_prefix ("...")) {
+ next_char ();
+ next_char ();
+ next_char ();
+ return 3;
+ }
+
+ return 0;
+ }
+
private inline int id_prefix () {
if (!letter (get ())) {
return 0;
int id_len = 0;
if ((id_len = id_prefix ()) == 0) {
- this.column = column_start;
- this.pos = start;
- return null;
+ if (type == TokenType.GTKDOC_PARAM && (id_len = vararg_prefix ()) == 0) {
+ this.column = column_start;
+ this.pos = start;
+ return null;
+ }
}
unowned string separator = this.pos;