]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
{@inheritDoc} bug
authorFlorian Brosch <flo.brosch@gmail.com>
Sun, 6 Sep 2009 18:13:51 +0000 (20:13 +0200)
committerFlorian Brosch <flo.brosch@gmail.com>
Sun, 6 Sep 2009 18:13:51 +0000 (20:13 +0200)
src/libvaladoc/parser.vala

index f363f8ed62ea639414a4fe822f89d797aa3232e8..d073f8ef8291a03f87cb9e3b1f3c5a18a2912cc6 100755 (executable)
@@ -150,16 +150,16 @@ public class Valadoc.Parser : Object {
                return false;
        }
 
-       private string? parse_taglet_name ( Documented? curelement, string str, long strlen, ref long pos, long line, long newlinepos, long npos ) {
+       private string? parse_taglet_name (Documented? curelement, string str, long strlen, ref long pos, long line, long newlinepos, long npos, bool _inline) {
                long startpos = pos;
-               for ( ; str[pos]!=' '&&str[pos]!='\t'&&str[pos]!='\n'&&str[pos]!='\0'; pos++ );
-               if ( str[pos]=='\0'|| !str[pos].isspace() ) {
+               for (; str[pos]!=' '&&str[pos]!='\t'&&str[pos]!='\n'&&str[pos]!='\0'&&(_inline&&str[pos+1]!='}'); pos++);
+               if (str[pos]=='\0'|| !str[pos].isspace()) {
                        if (curelement != null) {
-                               this.printr ( ErrorNumber.OPEN_TAG, curelement.get_filename(), str, strlen, line, newlinepos, npos, -1 );
+                               this.printr (ErrorNumber.OPEN_TAG, curelement.get_filename(), str, strlen, line, newlinepos, npos, -1);
                        }
                        return null;
                }
-               return str.substring ( startpos, pos-startpos );
+               return str.substring (startpos, pos-startpos);
        }
 
        private bool parse_inline_taglet_pos ( Documented curelement, string str, long strlen, Gee.ArrayList<DocElement> content, ref long npos, ref long nline, ref long nnewlinepos, bool wikimode ) {
@@ -193,7 +193,7 @@ public class Valadoc.Parser : Object {
                long keywordline = line;
                pos++;
 
-               string keyword = this.parse_taglet_name ( curelement, str, strlen, ref pos, line, newlinepos, npos );
+               string keyword = this.parse_taglet_name (curelement, str, strlen, ref pos, line, newlinepos, npos, true);
                if ( keyword == null ) {
                        return false;
                }
@@ -661,7 +661,7 @@ public class Valadoc.Parser : Object {
                long keywordline =  nline;
 
 
-               string keyword = this.parse_taglet_name ( curelement, str, strlen, ref pos, line, newlinepos, npos );
+               string keyword = this.parse_taglet_name (curelement, str, strlen, ref pos, line, newlinepos, npos, false);
                if ( keyword == null ) {
                        return false;
                }
@@ -1002,7 +1002,7 @@ public class Valadoc.Parser : Object {
 
                pos++;
 
-               string keyword = this.parse_taglet_name ( null, str, strlen, ref pos, line, newlinepos, npos );
+               string keyword = this.parse_taglet_name (null, str, strlen, ref pos, line, newlinepos, npos, true);
                if ( keyword != "inheritDoc" ) {
                        return false;
                }